Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Anonymous
Not applicable
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?

Anonymous
Not applicable
Author

sorry typo. orange is 3 and red is 5

sunny_talwar

Try the attached