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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qliksense_77
Creator
Creator

Sum aggr count distinct with a condition

Hi,

I want to count the number of distinct sales per day and per costumer, but only if it is a sale per telephone. 

Therefore I need to make this expression to be conditional of sale per telephone: 

Sum(Aggr(count (distinct sale), Date, costumer) )

 

 

1 Solution

Accepted Solutions
agigliotti
MVP
MVP

Hi @Qliksense_77 ,

Of course I don't know exactly your field names but you can try something as below:

=Sum( Aggr( count( {< sales_type = {'telephone'} >} distinct sale), Date, costumer ) )

I hope it can helps.
Best Regards

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it

View solution in original post

2 Replies
agigliotti
MVP
MVP

Hi @Qliksense_77 ,

Of course I don't know exactly your field names but you can try something as below:

=Sum( Aggr( count( {< sales_type = {'telephone'} >} distinct sale), Date, costumer ) )

I hope it can helps.
Best Regards

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
Qliksense_77
Creator
Creator
Author

It works:)