Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a known way of using GetObjectDimension within Aggr? Let's say I have the following data:
Date | Division | Department | Daily Profit |
---|---|---|---|
6/3/2018 | A | A1 | 50 |
6/4/2018 | A | A1 | 60 |
6/5/2018 | A | A1 | 10 |
6/4/2018 | A | A2 | -30 |
6/5/2018 | A | A2 | 30 |
If I use this data in a 2d Pivot table and I want to add a std deviation function that is dynamic based on the orderings of the Dimensions and how many levels are open, is there any way I can use the above function?
Example of what I am trying: stdev(aggr(Sum([Daily Profit]),GetObjectDimension(Dimensionality()-1),Date))
The result of the above is '-' all the way down no matter what dimensions are exposed. Any way i can adapt this without using if statements? I think Qlik is just not parsing the GetObjectDimension(Dimensionality()-1) correctly for some reason, even though I have confirmed that this expressions gives me what I desire by dropping it into my table.
I know that you can do nested if statements, but if the number of dimensions I have in my 2d pivot table is more than 2, then the nested if statements become unwieldy and complicated.
Thank you in advance!
Try this
Stdev(Aggr(Sum([Daily Profit]), $(='[' & GetObjectDimension(Dimensionality()-1) & ']'), Date))
Hmm, this did not work either. Still getting '-' everywhere.