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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter in Chart Totals

Hi,

I have a set of data imported from SQL which looks like this:

FileName FileSize Summed

CP 1000 1

VP 2000 1

CP2 100 0

I want to display the data in a chart, so that when each file name is selected it shows the appropriate file size (easy), but where nothing is selected in the filter only the sizes where the Summed Column is 1 should be totalled. So in the case above the total file size would be 3000 (the CP2 file size is not summed, so not included in the total).

I have tried various If statements in the Expression but with no luck. Can anyone help?

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Assuming your Summed values are always 1 or 0, you've got a builtin Oleg-style flag to use. How about an chart expression like:

sum(if(GetSelectedCount(FileName) > 0, FileSize, FileSize * Summed))

-Rob