CRM On Demand - Reports and Dashboards (MOSC)

MOSC Banner

(CASE WHEN) Counting several times the same date / subsets inside a filter ?

edited Mar 13, 2015 11:07AM in CRM On Demand - Reports and Dashboards (MOSC) 1 commentAnswered

Hello everyone,

I’m trying to create a filter in a report.

Let’s say that in one hand we have one column A with 2 values : a and b. In the other hand, we have 2 more values from another column X : x and y.

I tried to write something like CASE WHEN A=’a’ THEN ‘a’ WHEN A=’b’ THEN ‘b’, WHEN A IN (‘a’, ‘b’) AND X=’x’ THEN ‘x’ WHEN A IN (‘a’, ‘b’) AND X<>’x’ THEN ‘y’ ELSE ‘’ END.

My problem is that in the results, I only have a and b, I can’t have x or y. My guess is because the filter doesn’t count several times the same data, so everything is a or b.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center