How to recreate store lookup based on an aggregated value #689
-
Hi, I'm trying to recreate a particular measure from a Java ActivePivot project in atoti. The Java code for this measure looks like this:
The mapping function is a simple if/else block that returns a string based on the value of the "Quantity Sold" measure. I've been trying to recreate this in atoti but so far haven't had much luck. A regular join here doesn't work as the interval value needs to be determined by the aggregated value of the "Quantity Sold" measure. Any advice on how to recreate this if it is possible? Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Ollie, If you need more help recreating the measure, could you share your datastore cube structure so we can advise you on the best way to create this measure. FYI the lookup function is coming in the next version of atoti. |
Beta Was this translation helpful? Give feedback.
Hi Ollie,
You can use the
tt.where
or thett.switch
functions to create measures requiringif/else
logic. You could probably combine this with thett.agg.single_value
andtt.at
functions to recreate the behavior you want.If you need more help recreating the measure, could you share your datastore cube structure so we can advise you on the best way to create this measure.
FYI the lookup function is coming in the next version of atoti.