Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Alam
Contributor II
Contributor II

Set Expression

I have used the expression to calculate the % of column total where column in Month

sum([TPAM.total]) /sum(total <[TPAM.Month]>[TPAM.total])

My pivot:-

Alam_3-1675775786910.png

 

 

 

However, when I filter my pivot table based on any ID or account type, the % values change based on the selection

How do i edit this expression so that even if I have filtered for a specific ID, I still get a % value that represents % of entire column total, rather than % of selection total.

So, where it shows 99.48% in November for 'Others', it should show 0.14% (Total of November is 1,068,773 and total for this account type for this ID is 1,529 hence 1529/1068773 = 0.14%)

Labels (3)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Ignore selections from both the numerator and the denominator

You most likely also need to ignore the second AccountType dimension as well

sum({<[EIM ID-TrouxID]=,AccountType=>}   [TPAM.total]) /sum({<[EIM ID-TrouxID]=,AccountType=>}  TOTAL  <[TPAM.Month]> [TPAM.total] )

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

3 Replies
ogster1974
Partner - Master II
Partner - Master II

if you want to exclude a field from your set analysis 

{<ID= >}

will ignore any selections on this field.

Alam
Contributor II
Contributor II
Author

@ogster1974 thank you. However, I have changed my expression to:-

sum([TPAM.total]) /sum(total {<[EIM ID-TrouxID]=>} <[TPAM.Month]> [TPAM.total] )

But it is still not working. 

Any suggestions please?

vinieme12
Champion III
Champion III

Ignore selections from both the numerator and the denominator

You most likely also need to ignore the second AccountType dimension as well

sum({<[EIM ID-TrouxID]=,AccountType=>}   [TPAM.total]) /sum({<[EIM ID-TrouxID]=,AccountType=>}  TOTAL  <[TPAM.Month]> [TPAM.total] )

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.