Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vijvipin
Contributor
Contributor

Sum(Count(distinct))

Hi Everyone

I am quite new to Qlik and struggling with fitting Sum(Count(distinct)

In my dashboard I have a requirement to show count of Incidents we have received based on their Priority. Along with this we also want to show what is the percentage of that count of the total number of incident. Following is the expected output..

I am trying to achieve this in a straight table. My challenge is Percentage calculation. The logic should be: Percentage of Distinct Incident to the total number of Incidents.

As show below for example: I have 145 Critical incident and Total incidents are 968. The percentage would be 15.0 (rounded off)

  

PriorityCount(DISTINCT([Incident Number]))Percentage
Critical14515.0
High29730.7
Low737.5
Medium45346.8
Total968100

Please help me get desired output. Sample data file is attached.

Note: Please note that there must be DISTINCT as same incident can be repeated multiple times.

Regards

Vipin Vij

1 Solution

Accepted Solutions
neelamsaroha157
Specialist II
Specialist II

For the Total you can also use the below expression if you want to override the selection in 'Priority' field -

count(TOTAL  {<Priority = >} DISTINCT [Incident Number])

View solution in original post

4 Replies
neelamsaroha157
Specialist II
Specialist II

Check this out

neelamsaroha157
Specialist II
Specialist II

For the Total you can also use the below expression if you want to override the selection in 'Priority' field -

count(TOTAL  {<Priority = >} DISTINCT [Incident Number])

vijvipin
Contributor
Contributor
Author

Hi @Neelam

It worked like a charm! Bingo

Thanks for this!!

Amber
Contributor
Contributor

Hi,

if we have hier one dimention more, for example date, how can the percentage per day be caculated.

Thanks.

-Amber