Case statement in IDT

HI

My case statement in Information design tool is throwing me error, Please help me in correcting it.

Error:

Syntax

CASE "MeasureList"."Select_a_Measure"
  WHEN 'Commission' THEN @catalog('Y800')."OPH"."TRADEFACT_V"."REVENUE"
  WHEN 'Concession' THEN @catalog('Y800')."OPH"."TRADEFACT_V"."QUANTITY"
ELSE 0
END

RUC :us: (BOB member since 2010-05-03)

So you are using a multi-source UNX?


Andreas :de: (BOB member since 2002-06-20)

Yes I am using multisource univers. Is the syntax correct ?/


RUC :us: (BOB member since 2010-05-03)

Please help out with this syntax in IDT. I am not sure this works with Information Design tool

CASE "MeasureList"."Select_a_Measure" 
  WHEN 'Commission' THEN @catalog('Y800')."OPH"."TRADEFACT_V"."REVENUE" 
  WHEN 'Concession' THEN @catalog('Y800')."OPH"."TRADEFACT_V"."QUANTITY" 
ELSE 0 
END

:hb: :hb: :hb: :hb:


RUC :us: (BOB member since 2010-05-03)

Internally REVENUE" is translated into Decimal while QUANTITY translated to integer. use Cast and convert to same data type.

I had similar issue while working with DateTime and Timestamp. converting to same datatype worked!


vigi_guna :australia: (BOB member since 2008-07-09)

Hi RUC,

I am getting the same error in IDT with multi source. Have you got resolved the iisue?

Can anyone suggest a solution for the issue?

Thanks,
Raj


Raj2010 (BOB member since 2009-09-16)

Your CASE statement must return a value with the same data type on all the 3 scenarios.

0 is an integer.
Revenue may be having decimals…
Quantity may be again integer…


BO_Chief :us: (BOB member since 2004-06-06)

This may be trivial: Why do I see double quotes (" ") around Quantity & Revenue in the then part when the result values’ datatype is Integer? Double Quotes do not belong there.

Thanks


M H Mohammed :us: (BOB member since 2010-06-16)

Hi Mohammed,

That double quotes are displaying by default for any object irrespective of measure or dimension. In the original syntax i think he provided the object names not values thatswhy seeing those double quotes.

Thanks,
Raj.


Raj2010 (BOB member since 2009-09-16)

Hi All,

I am getting Unsupported signature ‘IFELSE(BIT, INTEGER, DOUBLE)’ error in my IDT multi source universe.

The syntax i am using for the calculation is:

 Sum(Case when (MeasureA/MeasureC) =0 Then 0 Else ((MeasureA*MeasureB)/(MeasureA/MeasureC)) End).

With out case statement the syntax is parsing but giving Division zero error. If i use case statement i am getting above error. If i dont use else condition in the case statement then the syntax is parsing and getting all zero values.

Can anyone through some light on how to resolve this issue? I appreciate your help.

Environment: BO 4 Sp6 and Sql Server

Thanks,
Krish.


Krish_bo (BOB member since 2014-02-11)