Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
MalcolmCICWF
Creator III
Creator III

% of Total that does not change with selections

I have wondered this a few times... what is the easiest way to display the percentage of a total statically so that when I make a selection, it still reflects the percentage  of the total, and not the percentage of the volume I have selected?

Pre Selection:

Capture.JPG

Post Selection:

Capture.JPG

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Sum(ID_COUNT)/Sum(TOTAL {1} ID_COUNT)

View solution in original post

9 Replies
florentina_doga
Partner - Creator III
Partner - Creator III

use this

sum(amount)

/

sum(total amount)

in percent

sunny_talwar

What is the expression you are using? Assuming it is Count(Account) with relative option checked, you can change it to this:

Count(Account)/Count({1} TOTAL Account) -> With relative unchecked now

or if you want to only let the denominator not change on certain dimensions, you can do like this:

Count(Account)/Count({<Year>} TOTAL Account) -> With relative unchecked now


UPDATE: Forgot to add TOTAL which is not added

MalcolmCICWF
Creator III
Creator III
Author

I'm using that, not working

MalcolmCICWF
Creator III
Creator III
Author

This is what I am using and no matter what, when I select criteria, it changes to % of what is selected.

sum(ID_COUNT)/Sum(Total ID_COUNT)

sunny_talwar

Try this:

Sum(ID_COUNT)/Sum(TOTAL {1} ID_COUNT)

MalcolmCICWF
Creator III
Creator III
Author

You are like my Qlik guardian angel lately Sunny, which I appreciate. Are you able to explain the use of the {1} within this expression?

sunny_talwar

Sure thing.

So the reason your % age was changing was because as soon as your made a selection your denominator was also getting filtered based on the selection. Since you don't want the denominator to change, you just need to add {1} to tell it to avoid any selections.

Now, if you only want certain selections to be avoided (while still getting filtered on other selections) you need to specify the names of those fields which should not be filtered

{<Field1, Field2, Field4>}

on the other hand if you have a long list of fields on which it should not filter a few fields on which it should filter, you can do like this:

{1<Field3 = $::Field3>}

MalcolmCICWF
Creator III
Creator III
Author

thanks, very informative

sunny_talwar

No problem at all