Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count if with unique values

Hello,

I've been using Qliksense for a while now and so far every issue I had i could solve by a blog post in this community, it is very helpful! Now however I came across something I can't figure out how to do this. I have millions of records in the following format:

 

Part IDFault code
1F01
2F01
3F03
3F02
4
5F03
5F02
5F01
6
7
8F03
8F02
9
10F01

I want to show a KPI of the 'touch' on part level and show it in % of total produced parts. Which means I have to count the amount of Unique Part ID's with a fault code and divide it by the total amount of Unique Part ID's.

In this example it would be 6 parts with a fault code (some with multiple fault codes but this doesn't matter for the touch %) of 10 total parts giving 60% touch.

I hope someone can help me with this.

Thanks for your help.

Geert

Labels (1)
1 Solution

Accepted Solutions
mdmukramali
Specialist III
Specialist III

Hi,

try like this,

=Count({<Faultcode={'*'}>}Distinct PartID)

/

Count(Distinct PartID)

View solution in original post

3 Replies
antoniotiman
Master III
Master III

May be this

Num(Count({<PartID={"=Len(Trim(MaxString(Faultcode))) > 0"}>} DISTINCT PartID)/Count(DISTINCT PartID),'#0 %')

Regards,

Antonio

mdmukramali
Specialist III
Specialist III

Hi,

try like this,

=Count({<Faultcode={'*'}>}Distinct PartID)

/

Count(Distinct PartID)

Anonymous
Not applicable
Author

Hi,

Both solutions worked, thanks a lot!

Geert