Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Distinct count

Hello,

I would like to do a count on the following excel sheet. I need to extract the number of "24 hours" cards, however as you can see, the card number 2402501 has 2 lines due to the fact that 2 activities has been linked to it.

how can I proceed ?

I can easily do this with a table but I need to have just one "text object". what could be the formula for this ?

thanks in advance for your help.

JP

8 Replies
Not applicable
Author

Hi Jean,

Sorry mate, don't really get what your trying to accomplish here. Care to elaborate?

Best Regards,

R

alexandros17

Yes each card number has 2 lines but which one you need to select?

arulsettu
Master III
Master III

hi

try this

count(distinct K_Nummer)

Not applicable
Author

Hello

What I am trying to extract is the total number of 24h cards and the total number of 48h cards.

In my example, I should be able the find "4" as the number of 24h cards based on the fact that we 5 lines but the 2402501 has been used 2 times (same cards)

For the 48h card, I should be able to find "3". we have 6 lines but the card 4801622 has been used 4 times and therefore should count as 1 and the 2 others only 1 time.

is that more clear ?

thanks for your help.

Best

JP

yduval75
Partner
Partner

You have to create a staitght table with K_Nummer in dimension and Count (DISTINCT KT_Bezeichnung) as expression

rajat2392
Partner
Partner

check the app..I think this will solve the problem...

Not applicable
Author

2014-04-16_14h06_42.pngthis is what I have done....and I have a "0" result...

tresesco
MVP
MVP

Why [Card Number]? Your sample data says, it should be KT_Bezeichnung, like:

=Count({<KT_Bezeichnung={'24h*'}>}DISTINCT KT_Bezeichnung)

Or, if you want to count [Card Number], the expression has to be like:

=

Count({< [Card Number]={'24*'}>}DISTINCT  [Card Number])