COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sg on 21 Jul 2009 08:59:51 AM

Title: How to implement an MDX query in report studio
Post by: sg on 21 Jul 2009 08:59:51 AM
Hi,

I have an MDX query which runs fine below.

Select {
ParallelPeriod([Invoice Date].[Fiscal Period].[Fiscal Period],1,
ClosingPeriod([Invoice Date].[Fiscal Period].[Fiscal Period],[Invoice Date].[Fiscal Period].DefaultMember))} on 0
from [TYCO_PA_CUBE]

Now i need to implement the same in an expression in report studio. Please let me know how it is implemented. I tried writing an expression

ClosingPeriod([TYCO_PA_CUBE].[Invoice Date].[Invoice Date.Fiscal Period].[Fiscal Period],[TYCO_PA_CUBE].[Invoice Date].DefaultMember)

but it throws parsing error. Any help in this regard would be appreciated.

Thanks,
Sg

Title: Re: How to implement an MDX query in report studio
Post by: CognosPaul on 21 Jul 2009 10:04:54 AM
Cognos doesn't use native MDX in queries, you have to write the functions according to the cognos specifications. Try the following:

ClosingPeriod([TYCO_PA_CUBE].[Invoice Date].[Invoice Date.Fiscal Period].[Fiscal Period],defaultmember([TYCO_PA_CUBE].[Invoice Date]))