cancel
Showing results for 
Search instead for 
Did you mean: 

How to do a CASE statement in Universe Design

Former Member
0 Kudos

Hello Experts!

I'd like to a CASE statement in Universe Design but I don't know how to do it. Could anybody help me?

I tried this following example but I had no success.

<EXPRESSION>

CASE

WHEN @Select(Product Category\L01 Product Category) = '1000010001' THEN 'BUNGEPRO'

WHEN @Select(Product Category\L01 Product Category) = '1000010001' THEN 'FARELO'

END

</EXPRESSION>

Thank you all!

Rubens

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Rubens

In that case,

>> create Filter in BEx query

>> Create BI Variable (Mandatory/ Optional) (Single/Multiple) etc...,

Which will come to BO as Filter or Prompt.

I'm Back

Former Member
0 Kudos

Hi,

It seems that you database is SAP BW and you want to use MDX.

First CASE WHEN is not supported by MDX you have to use IIF instead of CASE WHEN.

Secondly SAP BW MDX does not support that the result of an expression returns string, only numeric values are supported.

Didier

Former Member
0 Kudos

Hi Didier!

Thanks for the answer.

Well, the database is SAP BW and my need is to do a transformation that will be used as a filter in Web Intelligence Query.

Do you suggest to do it in another way?

It seems that neither CASE WHEN or IIF would work in this case. Is that right?

Thank you in advance.

Rubens

Former Member
0 Kudos

in Designer, syntax is dependant on database. so make sure the syntax is working in database client tool. just copy that into object definition

Former Member
0 Kudos

Verify that the syntax is correct and you are able to parse the universe object.

For example

CASE WHEN Product.Name='Cars'

THEN 1

ELSE 0

END

You may also try a combination of case statement at the universe level and nested-if's at the report level.

Edited by: Narender Jayachandran on Dec 23, 2010 4:40 PM