Discussion Board for collaboration related to QlikView App Development.
got a pivot table in which dimensions are conditionally enabled/ disabled
I have an expression that needs to be aggregated first by date then by the enabled dimensions
so I want to write something like:
sum(aggr( my_expression, date,enabled_dim1, enabled_dim2, etc...))
kindly advise on how to accomplish this
I'm not sure if I understand you correctly. Are you able to attach an example?
Should the dimensions be dynamically used in the aggregation? so based on your selections different dimensions should be enabled?
You could use the same conditions to decide on the dimensions in the aggr(), like:
Sum(Aggr(Sum(Value),$(=Pick(match(vDimEnable,1,2), 'Dim1', 'Dim2'))))
yes this is the case
Then you could use a variable that concats the possibilities:
And in your aggregate:
sum(aggr( SUM(my_expression_field), $(=vDim)))
By using $(= the value of the dimension is used, an that is a list of dimensions.
If you only need one enabled dimension then look at what tresesco recommends.