Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

subramanir3
New Contributor

How to implement set expression and Total function together?

For Example, 

A Pivot table has Region in Columns and Classifications in Rows as shown in the screenshot attached

I am trying to obtain the total values across the regions for individual Classifications to be shown in every cell of the classification only for the data pertaining to Round_id =2. Please refer to the screenshot for better understanding of the expectation.

 

This is the formula, I have been using "sum( {$<Round_ID={'2'}>} Total<Classification> Points_Earned)" for that. However, the result is ignorant of the total function I put in the expression. That means the same result is obtained even without the Total Function "sum( {$<Round_ID={'2'}>} Points_Earned)". Can you please correct me for where the mistake is?

Note: When I don't use the set expression alongside the Total function, "sum(Total<Classification> Points_Earned)", the result comes out correctly considering the total function. However, I want this expression to be modified to account for specific round_id's embedded in the set expression.

 

3 Replies
anushree1
Valued Contributor II

Re: How to implement set expression and Total function together?

can u share a sample application

 

Partner
Partner

Re: How to implement set expression and Total function together?

Hi Subramanir,

If I'm following your problem, you want all the same values for all regions. Then why do this? Why don't create a normal table with Sum([YourField]) and the Classification as dimension?

Jordy

Climber

Work smarter, not harder
Partner
Partner

Re: How to implement set expression and Total function together?

I see that you have deleted your last response, but if you use a total function,  you should put it in front of the set analysis:

sum( {$<Round_ID={"$(=max(Round_ID))"}>}  Total<Classification> Points_Earned)

Change into:
sum(Total  {$<Round_ID={"$(=max(Round_ID))"}>}  Points_Earned)

Jordy

Climber

Work smarter, not harder