COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: lmolson on 06 Jan 2010 03:14:29 PM

Title: if-then-else using tuple functions on sqlcube data.
Post by: lmolson on 06 Jan 2010 03:14:29 PM
If ( [CurrentMonth]  in ('01', '02') )
Then
  (total    (tuple([NUMERATOR],[PY1]))   /total    (tuple([DENOMINATOR],[PY1]))  )
Else
(  total    (tuple([NUMERATOR],[CY]))    /  total    (tuple([DENOMINATOR],[CY]))   )

The above does not work properly.  The tuple by itself works, the if-then-else with hardcoded values works but throw the two together and the if does not evaluate properly to the then, it falls through to the Else.  Any clues?  The dimensional data (numerator, denominator) are measures in a sql cube the py1 and cy are from a relative date heirarchy, the CurrentMonth is a dataitem with the month extracted out(substring(cast([Current Date] , varchar(10)),6,2)

Your help is appreciated.  Thanks, Leann
Title: Re: if-then-else using tuple functions on sqlcube data.
Post by: MFGF on 07 Jan 2010 04:10:49 AM
Hi Leann,

More information needed, sorry.

Is this a List report? Crosstab? Chart?

What is the calculated item being used for?  List column?  Crosstab default measure? Crosstab row/column item?

What do you mean by SQL cube?  Do you mean Microsoft Analysis Services?  Or are you referring to Dimensionally Modelled Relational (DMR) objects defined in Framework Manager?

Thanks,

MF.