COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos05 on 19 Aug 2014 09:38:44 AM

Title: Issue with using Macros and MUN Expression
Post by: cognos05 on 19 Aug 2014 09:38:44 AM
Hi All,

I am using the below expression in my data item

if(#timestampMask($current_timestamp,'mm')#>6)
then
(#'[Sales].[Months].[Months]->:[TM].[Months].[Months].[@MEMBER].[FY' + timestampMask($current_timestamp,'yyyy') + ']'#)
Else
(Lag(#'[Sales].[Months].[Months]->:[TM].[Months].[Months].[@MEMBER].[FY' + timestampMask($current_timestamp,'yyyy') + ']'#,1))

That is if current month is greater than june then show the FY 2014 or show the FY 2013

My MUN Value :[Sales].[Months].[Months]->:[TM].[Months].[Months].[@MEMBER].[FY2014] .

Here the issue is since I am using if else the appropriate data item is selected but the data item name is displayed instead of actual member name.
If I dont use if else and seperately write the if or the else condition then it shows the value with appropriate name.

Do I need to always write an report expression separately  if using with IF and Else for the data item name.


Title: Re: Issue with using Macros and MUN Expression
Post by: cognos05 on 19 Aug 2014 05:12:55 PM
Hi All,

If I use If else with in macro with mun , it is not giving me the data item name.
And important thing is If i want to show the children of this data item ,it will not work. It will og an substitue the if else statement inside the children of function and throws an error.I also tried giving member () in if else statement,but dint work.

Any help is appreciated. I tried several approaches the last one would be to create a completed fiscal year hierarchy in TM1.

Thanks,
Nithya