Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
win_anthony
Partner - Contributor III
Partner - Contributor III

Total Sales Over $500k

The goal is to create a syntax that will only list the total sales for companies that are over $500k on a bar chart. I have been trying to get this to work but the output is simply not working. 

Current Syntax which is NOT working:

= NUM( SUM( {$< [Pizza Stores Flag] = {'Yes'}, SUM([Sales]) > 500000 >} [Sales] ), '$#,##0')

Ex: List only companies with sales $500k > that sell PIZZA

- McDonalds = $1.2m

- Domino's Pizza = $2m

- Popeyes = $1m

- Pizza Hut = $200k

- Papa John's Pizza = $600k

Target Output:

- Domino's Pizza ($2m) + Papa John's Pizza ($600k) = $2.6m

 

I know the example might be archaic but I hope you can understand what I am trying to get at. 

Labels (4)
2 Replies
Kushal_Chawda

try something like below

NUM( SUM( {$< [Pizza Stores Flag] = {'Yes'},Company={"=SUM([Sales]) > 500000"} >} [Sales] ), '$#,##0')

or

NUM( SUM( {$<Company={"=SUM({<[Pizza Stores Flag] = {'Yes'}>}[Sales]) > 500000"} >} [Sales] ), '$#,##0')
Brett_Bleess
Former Employee
Former Employee

In addition to Kush's response, I wanted to give you another area to look for some posts that may be helpful:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Specifically, maybe the following:

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

Hopefully those along with Kush's post will get you what you needed.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.