Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
thomasmercer
Contributor III
Contributor III

Set analysis giving larger incorrect sum than no set analysis

Really strange issue which I'm at wits end trying to figure out. When I apply a filter to a field called "Source" for anything (e.g. "Electronic"), my set analysis measures ignore the filter. Example when filter is applied:

Sum({<Source={"Paper"}>}jobs) = 593k
Sum(jobs) = 0

Among other things I've tried deleting the source tables and re-adding with different field names and tried using a different field which creates the same problem. If I create a second field in the table with the exact same values (e.g. "Source2") with exact same values then filter on in the sheet instead, it will evaluate correctly (Sum({<Source={"Paper"}>}jobs) = 0)

Any ideas at what might be causing this and how I can avoid it?

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Change your expression to this

Sum({<Source *= {"Paper"}>} jobs)

Added * before the equal sign. which just means that honor the selection in Source field and basically show the intersection between what is selected and Source = Paper. So, if Paper is not selected the expression should just show 0 now. 

View solution in original post

3 Replies
thomasmercer
Contributor III
Contributor III
Author

Some images to help show what is happening:

clipboard_image_4.png

 

clipboard_image_2.png

clipboard_image_3.png

clipboard_image_5.png

I don't understand what is causing the application to evaluate to not evaluate Paper Soruce = 0 when a different source is selected. This issue results in it evaluating the number of paper source jobs being greater than the number of all jobs:

clipboard_image_6.png

 

 

sunny_talwar

Change your expression to this

Sum({<Source *= {"Paper"}>} jobs)

Added * before the equal sign. which just means that honor the selection in Source field and basically show the intersection between what is selected and Source = Paper. So, if Paper is not selected the expression should just show 0 now. 

thomasmercer
Contributor III
Contributor III
Author

Thanks Sunny - never realised * was required for honoring the intersection. Works perfectly!

Cheers