Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Tim_G
Contributor III
Contributor III

Aggr over class with variable

Hello there,

I am trying to aggregate over a class which depends on a variable, such like this:

aggr(nodistinct SALES, PRODUCT_LEVEL, class(PRODUCT_PRICE,$(v_PRICERANGE)))

The values should be shown in a simple table. Aggregation on PRODUCT_LEVEL works fine. But I further want aggregation on Price Categories which I set with a variable which is chosen via a slider. The variable works fine for other visualizations, such that I suppose there is a problem with aggregation on classes or variables respectively.

Other board discussions did not help. I would be greatful for any advice.

Labels (1)
2 Replies
jbhappysocks
Creator II
Creator II

Hi

You don't need to use aggr, just use 

class(PRODUCT_PRICE,$(v_PRICERANGE)) as dimension

and sum(Sales) as measure

jbhappysocks_0-1676024394806.png

jbhappysocks_1-1676024421105.png

 

Tim_G
Contributor III
Contributor III
Author

Hi,

thanks for the reply! However, this is not quite it. Maybe I did not explain it properly.

I also have PRODUCT as the lowest dimension and for each PRODUCT I want to have sum(SALES) in its specific PRODUCT_LEVEL and PRICE_RANGE. So I thought aggregation over the dimension would be the way to go.

Like this:

Tim_G_2-1676027750769.png

 

Maybe I am on the wrong lane here trying to solve this with an AGGR function. But for PRODUCT_LEVEL it works.