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

count with multiple conditions

I have this condition :

for a dimension brand:

Count(distinct if ( InvoicedQty>Target and YYYY=vYear ,Shop))

I want to count shops that reach the target for all branches.

Can someone help me ?

2 Replies
Not applicable
Author

I'd suggest trying the If() outside the Count() function. Something like the following:

=If((InvoicedQty>Target) and (YYYY=vYear), Count(distinct Shop), 0)

I hope that is helpful. Best regards,

James

Not applicable
Author

Hi James,

My expression is working but what I would like to have is an additional line with the number shops for which the target is reached for all brands.

I have :

Brandsreach target
Brand 110 shops
Brand 25 shops

I Would like to have:

Brandsreach target
Brand 110 shops
Brand 25 shops
reach target for brand 1 and 23 Shops