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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Peet
Contributor II
Contributor II

unique count of an item

Hello all,

Iam trying to find a help in a simple count function, Iam sure its very easy, but cannot figure it out...

My example looks like this: I need to have an expression, that will count how many unique orders have the status = exact value.

in this example, should be 1 for status=17, 2 for status=12 and 4 for status=4.

order_numstatus
1200013717
120001354
120001344
120001344
120001334
120001334
120001334
120001324
120001324
120001324
1200013112
1200013012
1200013012

 

Many thx for Your help 🙂

Labels (1)
1 Solution

Accepted Solutions
Peet
Contributor II
Contributor II
Author

I have make a lot of attempts to finaly got what I needed:

count ({<status={'17'}>} distinct order_num)

View solution in original post

3 Replies
Stoyan_Terziev
Partner - Creator III
Partner - Creator III

Hi,

 

You can create a table chart with dimension = status 

and expression:

Count(DISTINCT order_num)

 

I hope that helps!

Peet
Contributor II
Contributor II
Author

hi,

table chart is not really what I need. the expresion I need for further use in another calculations 😉 

For example, if one of the status is canceled order, I need the count only of theese to deduct them from total of my orders.

Thx for help

Peet
Contributor II
Contributor II
Author

I have make a lot of attempts to finaly got what I needed:

count ({<status={'17'}>} distinct order_num)