Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to count a field which has a common value with other fields?

In the above table, the value "ADAPTER" in ITEM NAME field is a common value for both "VO" and "PTO" of DIV field.

I want to count how many such values in ITEM NAME has the same characteristic.

Please assist.

1 Solution

Accepted Solutions
sunny_talwar

I used this expression

Count(DISTINCT {<[ITEM NAME] = {"=Count(DISTINCT DIV) > 1"}>} [ITEM NAME])

and got this

Capture.PNG

What is wrong?

View solution in original post

9 Replies
sunny_talwar

May be this

Count(DISTINCT {<[ITEM NAME] = {"=Count(DISTINCT DIV) > 1"}>} [ITEM NAME])

Anonymous
Not applicable
Author

shall I use this same as it is ?

or I have to enter the values like "PTO" and "VO" anywhere ?

arvind1494
Specialist
Specialist

Count(DISTINCT {<[ITEM NAME = {'=Count(DISTINCT DIV) > 1'}]>} [ITEM NAME])

sunny_talwar

Just try it as is

Anonymous
Not applicable
Author

it is giving distinct count value for each ITEM NAME.

I need count for each ITEM NAME value having "VO" and "PTO" in DIV field.

Eg; For the above table, the count value for "adapter" should be one and the same for "actuator" as well.

sunny_talwar

I am not sure I follow... is this what you want?

Dimension           Value

ADAPTER               1

ACTUATOR             1

Anonymous
Not applicable
Author

yes, correct!

sunny_talwar

I used this expression

Count(DISTINCT {<[ITEM NAME] = {"=Count(DISTINCT DIV) > 1"}>} [ITEM NAME])

and got this

Capture.PNG

What is wrong?

Anonymous
Not applicable
Author

Thanks Sunny and Arvind..