Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

COUNT DISTINCT on some fields

Hi,

I need some help with an expression on Qlik Sense.

I have the data table below

  

DR_GIDError IDKPI_DESC
3123415Data Accuracy
3123814Data Accuracy
3126912Data Accuracy
3130015Data Accuracy
3130012Data Accuracy
3130012Data Accuracy
310005Data Completeness

I would like to count all the DR_GID with KPI_Desc= "Data Accuracy" but with unique Error ID

For example:  for DR_GID=31300 the result would to be 2

I don't know how to write the set analysis correctly


I hope someone can help me with this.

Thanks for your help.

Mor

6 Replies
petter
Partner - Champion III
Partner - Champion III

Count( DISTINCT [<KPI_DESC={'Data Accuracy'}>} [Error ID] ) could be what you are looking for as you can see in this table:

2017-12-31 20_06_02-Qlik Sense Desktop.png

Anonymous
Not applicable
Author

‌Hi again,

I want to present the results by other fields.

For example I want to count the number of DR_GID but present it by country, count the set analysis above and present the results by country.

Thanks

MOr

sunny_talwar

May be like this

Sum(Aggr(Count(DISTINCT {<KPI_DESC = {'Data Accuracy'}>} [Error ID]), DR_GID, Country))

Anonymous
Not applicable
Author

Thanks a lot Sunny it WORKS!!!!!!!

sunny_talwar

Super

pradosh_thakur
Master II
Master II

Please Mark correct and helpful answers and close the thread so that  it can help others in future.

Learning never stops.