2 Replies Latest reply: Jul 26, 2018 3:29 PM by Elijah Abel RSS

    Using GetObjectDimension in Aggr

    Elijah Abel

           Is there a known way of using GetObjectDimension within Aggr? Let's say I have the following data:


      DateDivisionDepartmentDaily Profit



      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!