Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
quinsan12
Contributor III
Contributor III

Problem Dimension Pivot Tablet

I need to perform the calculation below, in the pivot table automatically following the hierarchy of the dimension. That is, in the first line add by dimension one and so on.

IF(Dimensionality()=1, Fractile(Aggr(Sum([core_hs_simulation.value]),[core_hs_scenarios.scenario_date], DIM1),0.01),


IF(Dimensionality()=2, Fractile(Aggr(Sum([core_hs_simulation.value]),[core_hs_scenarios.scenario_date], DIM1,DIM2),0.01),


IF(Dimensionality()=3, Fractile(Aggr(Sum([core_hs_simulation.value]),[core_hs_scenarios.scenario_date],DIM1,DIM2,DIM3),0.01)
)))

1 Solution

Accepted Solutions
quinsan12
Contributor III
Contributor III
Author

I Create variable and used the  function =GetObjectField(0)to get the dimensions.

Then applied the variables in the calculations.

IF(Dimensionality()=1, Fractile(Aggr(Sum([core_hs_simulation.value]),[core_hs_scenarios.scenario_date],$(vDim0)),0.01),

Now I can dynamically group by the selected dimension.

 

View solution in original post

1 Reply
quinsan12
Contributor III
Contributor III
Author

I Create variable and used the  function =GetObjectField(0)to get the dimensions.

Then applied the variables in the calculations.

IF(Dimensionality()=1, Fractile(Aggr(Sum([core_hs_simulation.value]),[core_hs_scenarios.scenario_date],$(vDim0)),0.01),

Now I can dynamically group by the selected dimension.