Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count with multiple conditions in the same dimension

Hello,

I want to count "number of shipments". The shipments could have N status codes (e.g. 'Picked-Up','Delivered' , etc.) - you might know from DHL or when you order something from the internet 😉

So my goal is to count shipments when they have specific status codes in our database.

For example we have defined 6 status codes as mandatory, so we want to count all shipments in our database where ALL 6 statuses have been set. e.g.

Shipments with status A: count(status = A... no of shipments) = 100

Shipments with status B: count(status = B.. no of shipments) = 90

Shipments with status A & B: count ???? = 80

The question is, which formula I should use?

I tried with the the "count" formula with comma, but could not have the correct number of shipments. Qliksense gave me the number of shipments with the last status in the formula

count (status = A, status = B, ... no of shipments) = 90

So I think the count formula cannot take me to my goal.

Maybe someone here will have a better idea?

Thanks!

1 Reply
sunny_talwar

May be like this

Count({<Status = {'A', 'B'}>} Shipment)

or this

Count({<Status = {'A'}>+<Status = {'B'}>} Shipment)