COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos05 on 08 Feb 2016 07:24:15 PM

Title: Dynamic Mun Error
Post by: cognos05 on 08 Feb 2016 07:24:15 PM
Here again I am getting a Mun Error , I am getting additional single quotes on Month Name

[1SaleCube].[Months].[Months].[Month]->:[PC].[@MEMBER].[Jan 2016]

#'[1SaleCube].[Months].[Months].[Month]->:[PC].[@MEMBER].['+substitute(timestampMask($current_timestamp ,'mm'),'',csv(grep (timestampMask(_add_days ($current_timestamp,-1),'mm'),array('01Jan','02Feb','03Mar','04Apr','05May','06Jun','07Jul','08Aug','09Sep','10Oct','11Nov','12Dec'))))+' '+timestampMask($current_timestamp,'yyyy')+']'#

Error:

[PC].[@MEMBER].['Feb' 2016] does not exist

Please suggest why is an additional single quote coming in my expression.

Thanks,
Nithya
Title: Re: Dynamic Mun Error
Post by: cognos05 on 09 Feb 2016 05:00:14 PM
Hi,

I went back to one of old post where Nimrod has given me one solution for this.

But we are not sure why the actual expression did not work. Here is the work around
#'[1SaleCube].[Months].[Months].[Month]->:[PC].[@MEMBER].['+substitute('''','',substitute('''','', substitute(timestampMask($current_timestamp,'mm'),'',csv(grep (timestampMask($current_timestamp,'mm'),array('01Jan','02Feb','03Mar','04Apr','05May','06Jun','07Jul','08Aug','09Sep','10Oct','11Nov','12Dec'))))))+' '+timestampMask($current_timestamp,'yyyy')+']'#


If anyone can tell me the actual solution it will be great.

Thanks,
Nithya