COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos05 on 28 Oct 2014 11:07:09 AM

Title: Getting error on generating MUN
Post by: cognos05 on 28 Oct 2014 11:07:09 AM
Hi,

My member unique name for a time period is

[Sales].[Time Period].[Time Period].[Year]->:[PC].[@MEMBER].[20130701-20140630]

I am using below code in the data item expression and its throwing parsing error.
Am I missing some brackets or paranthesis. I dont know to see to what this statement is executed.

(#'[Sales].[Time Period].[Time Period].[Year]->:[PC].[@MEMBER].[timestampMask(_add_years($current_timestamp,-1),'yyyy') + '0701-'+ timestampMask($current_timestamp,'yyyy')+'0630'+ ']'#)

Thanks,
Nithya


Title: Re: Getting error on generating MUN
Post by: MFGF on 29 Oct 2014 07:56:45 AM
Quote from: nithya1224 on 28 Oct 2014 11:07:09 AM
Hi,

My member unique name for a time period is

[Sales].[Time Period].[Time Period].[Year]->:[PC].[@MEMBER].[20130701-20140630]

I am using below code in the data item expression and its throwing parsing error.
Am I missing some brackets or paranthesis. I dont know to see to what this statement is executed.

(#'[Sales].[Time Period].[Time Period].[Year]->:[PC].[@MEMBER].[timestampMask(_add_years($current_timestamp,-1),'yyyy') + '0701-'+ timestampMask($current_timestamp,'yyyy')+'0630'+ ']'#)

Thanks,
Nithya

Hi,

Try this:

#'[Sales].[Time Period].[Time Period].[Year]->:[PC].[@MEMBER].[' + timestampMask(_add_years ($current_timestamp,-1),'yyyy') + '0701-' + timestampMask($current_timestamp,'yyyy') + '0630]'#

Cheers!

MF.
Title: Re: Getting error on generating MUN
Post by: cognos05 on 29 Oct 2014 08:01:00 AM
Yes it worked . Thanks MFGF.

Regards,
Nithya