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

Using DISTINCT

Hi,

I am trying to calculate the percentage which tasks have been delivered for accounts.  Tasks may be performed more than once, however i am disregarding this as i am looking for completeness in the range of tasks.  So if i have task 1, 2, 3, 4, 5 and 6 where 1, 2, 3 was completed but 3 was done twice, the calculation should still result in 50% completion not 66%.  So I am trying to use DISTINCT as follows:

count (distinct [task name])

Which works when i've filtered down to 1 account.  When unfiltered so i have more than 1 account it consolidates the count of distinct task names. So if account 1 and 2 had completed tasks 1, 2 and 3, it would give me a count of 3 instead of the desired 6.  How do I get QV to count distinct task names per account?? 

Thanks for any help.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Take a straight table; dimension:Account, Expression: =count (distinct [task name])

View solution in original post

3 Replies
tresesco
MVP
MVP

Take a straight table; dimension:Account, Expression: =count (distinct [task name])

anbu1984
Master III
Master III

count (distinct account & [task name])

Not applicable
Author

Thanks to you both - i'd neglected the dimension!!

Cheers,

Carlo