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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selecting records within a chart

Hi All, Hopefully this is an easy one and I am making a simple error. I am looking at Sales records and pre-selecting the date range. All works fine except I want to calculate a success rate based on a single logical field (scanned). I need to sum the sales value field for both records where this field is value = 1 and also where it is value = 0, then turn these two results into a % success rate to be displayed in a chart. My problem is that I cant see how to get the values SUM (sales value) where scanned = 0 and SUM (salesvalue) where scanned = 1. Any suggestions would be gratefully appreciated. Thanks in advance Mark

4 Replies
Not applicable
Author

Hi,  Try SUM({<scanned = {"0","1"}>} salesvalue)    Cheers

Not applicable
Author

Thanks for the help. I think I may have expressed myself badly in the question. i think this solution gives me a total for both possible values of scanned, i need to have two seperate totals for the SUM(salesvalue) so that I can present a % of all salesvalue that are scanned = 1.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi

     Check with this

     SUM({<scanned = {0}>} salesvalue) for scanned =0

     SUM({<scanned = {1}>} salesvalue) for scanned =1

Celambarasan

Not applicable
Author

Try

SUM({<scanned = {"0"}>} salesvalue)    and    SUM({<scanned = {"1"}>} salesvalue)