Hi All,
I have scenario, where i need to display only last 70 period from the current date. Also, i need a running count of those date. Can this be done in DMR .
Here is syntax i have used to get the last 70 periods from the current date.
except(lastperiods(70,item(filter(
[Labor].[Date].[Fiscal Week].[Fiscal Week],
[Labor].[Date].[Fiscal Week].[Fiscal Week].[Current Date Flag]='y'),0)),
lastperiods(1,item(filter(
[Labor].[Date].[Fiscal Week].[Fiscal Week],
[Labor].[Date].[Fiscal Week].[Fiscal Week].[Current Date Flag]='y'),0)))
I tried using the below scripts, but it always return 69, does not show the running count. It shows over all count. >:(
total(1 within set except(lastperiods(70,item(filter(
[Labor].[Date].[Fiscal Week].[Fiscal Week],
[Labor].[Date].[Fiscal Week].[Fiscal Week].[Current Date Flag]='y'),0)),
lastperiods(1,item(filter(
[Labor].[Date].[Fiscal Week].[Fiscal Week],
[Labor].[Date].[Fiscal Week].[Fiscal Week].[Current Date Flag]='y'),0)))
)
Thank you,
lalitha
Any thoughts on this...
Hi,
You count everytime 69 members, because your Expression delivers a set of 69 members.
You Need to generate a more dynamic set e.g. running-total with periodsToDate http://www.ibm.com/developerworks/data/library/cognos/reporting/dimensional_queries/page563.html (http://www.ibm.com/developerworks/data/library/cognos/reporting/dimensional_queries/page563.html)
schrotty ;)