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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
linoyel
Specialist
Specialist

Chart expression - need help

Hi, I need help with writing a chart expression.

If I have the following data where "Sum of Sales" is an expression: sum([MONTHLY BRUTO SALES])+sum([BRUTO SALES])

MaterialCustomerSum of SalesCount distinct customer
184.675
abc1168.871
abc215.001
abc30.541
abc40.271
abc50.001

I need to present Number of distinct customers who BOUGHT the selected material - which means that Sum of Sales is supposed to be > 0. I need to get this:

  

MaterialCount distinct customer
abc

4

Thanks!

1 Solution

Accepted Solutions
linoyel
Specialist
Specialist
Author

Thank you for all your replies.

The formula that worked:

=Sum( Aggr (if($(vSalesSum) > 0, Count(DISTINCT [Customer])), [Material], [Customer]))

View solution in original post

6 Replies
swuehl
MVP
MVP

Maybe like

=Sum( Aggr( If( sum([MONTHLY BRUTO SALES])+sum([BRUTO SALES]) >0,1), Material, Customer))

lironbaram
Partner - Master III
Partner - Master III

hi you can use

sum(aggr(if(sum([MONTHLY BRUTO SALES])+sum([BRUTO SALES])>0,1,0),Customer,Material))

Anonymous
Not applicable

if (sum([MONTHLY BRUTO SALES])+sum([BRUTO SALES])>0,  Count(Material)) should do it

alexandros17
Partner - Champion III
Partner - Champion III

use this expression:

Count({$ <[Sum of Sales]={'>0'}>} TOTAL DISTINCT Customer)

cleitoncabral2
Contributor III
Contributor III

Se for mostrar somente o número de clientes pode fazer o seguinte:

count (distinct cliente)

linoyel
Specialist
Specialist
Author

Thank you for all your replies.

The formula that worked:

=Sum( Aggr (if($(vSalesSum) > 0, Count(DISTINCT [Customer])), [Material], [Customer]))