Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mor_rave
New Contributor

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

Tags (1)
6 Replies
MVP
MVP

Re: COUNT DISTINCT on some fields

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

mor_rave
New Contributor

Re: COUNT DISTINCT on some fields

‌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

Re: COUNT DISTINCT on some fields

May be like this

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

mor_rave
New Contributor

Re: COUNT DISTINCT on some fields

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

Re: COUNT DISTINCT on some fields

Super

pradosh_thakur
Honored Contributor II

Re: COUNT DISTINCT on some fields

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

Learning never stops.
Community Browser