Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 18 Oracle Analytics Lounge
- 218 Oracle Analytics News
- 44 Oracle Analytics Videos
- 15.8K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 82 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Exists condition in key metric

It it possible to add an exsists in custom metric?
Let's say I have col "A", "B", and "C".
In col "C" I want to count +1 when "A" >= 50 or when "B" = Y AND THERE IS NO OTHER VALUE IN "A" GREATER THAN 50.
Is it possible?
Answers
-
Can you please try using CASE Statement like following:
CASE WHEN
(A > 50 AND B = 'Y')
THEN
(C + 1)
ELSE
C
ENDHope this help.
Cheers,
1 -
Hi @Bhaskar Konar , unfortunately it doesn't help because current metric is:
CASE WHEN
(A >= 50 OR (A < 50 AND B = 'Y'))
THEN
(C + 1)
ELSE
C
END
This produces a +1 for both lines but I want +1 just for the second one since when there is a line with A >= 50 only that one should be counted. In fact the (A < 50 AND B = 'Y') condition should be used only when there is no other line with A >= 50
0 -
Can you please validate the requirement and my understanding.
Are you looking for something like below?
Cheers,
1 -
Hi @Bhaskar Konar , not really.
I must do the count for every person, my initial image was filtered by just a person for simplicity sake.
One person may have different rows and only one row for each person should have the +1:
Person1 is ok because there is only one row with A >= 50 and B is always N
Person2 is ok because every A is < = 50
Person3 has an hybrid situation0