Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
subramanir3
Contributor
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.

 

Labels (1)
3 Replies
anushree1
Specialist II
Specialist II

can u share a sample application

 

JordyWegman
Partner - Master
Partner - Master

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
JordyWegman
Partner - Master
Partner - Master

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