Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
padmaja_gade
Contributor III
Contributor III

Count only one in dimension value

Hello,

I have a chart where I am trying to show number of ID's in each color. But if a ID is in red and Orange then we have to count only once in red.

for example:

ID: 14209 has to counted only in red and for orange it has to show 0.

Below is my sample data.

Capture.PNG

Thanks for you help

5 Replies
sunny_talwar

May be try this expression:

=If(Count(DISTINCT TOTAL <ID> Color) = 2 and Color = 'Orange', 0, Count(DISTINCT Color))


Capture.PNG

padmaja_gade
Contributor III
Contributor III
Author

Sorry I was not clear in my earlier message.

this is my chart:

My Dimension: Color

My Expression: Count(ID)

When the ID has both red and orange, it should only count in red.

so Orange count: 5 and red should be:  5

Capture.PNG

sunny_talwar

How did you get 5 for Orange here?

padmaja_gade
Contributor III
Contributor III
Author

sorry typo. orange is 3 and red is 5

sunny_talwar

Try the attached