Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner
Partner

read list of dimensions used in a pivot table

Hello

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 can walk on water when it freezes
4 Replies
avkeep01
Partner
Partner

Hi Ali,

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?

tresesco
MVP
MVP

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'))))

ali_hijazi
Partner
Partner
Author

yes this is the case

I can walk on water when it freezes
avkeep01
Partner
Partner

Then you could use a variable that concats the possibilities:

vDim =

CONCAT(DISTINCT Dim_Selection,',')

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.