COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: totalzoom1 on 31 Jul 2018 09:20:00 PM

Title: Cognos cube report prior year salesto date
Post by: totalzoom1 on 31 Jul 2018 09:20:00 PM
Hi,

I have a bar chart with current year sales to-date and prior year sales to-date.
My current Year sales to-date shows sales data till date, but my prior year sales to-date show data till end of month.

eg: if i run report on Jul15th 2018

My current sales data is till july 15th 2018
but my prior sales data shows data till july 31st 2018,instead of July15 th 2018
Below is the calculation for prior year ales to data:

#CASE  prompt('Measure','token','Premium Amount')
WHEN 'Policy Count'
THEN 'aggregate(tuple([Actual Policy Count],parallelPeriod([Sales].[Time].[Time_H].[Year],1,currentMember([Sales].[Time].[Time_H]))) within set [CBU/Product Type Series])'
WHEN 'Face Amount'
THEN 'aggregate(tuple([Actual Face Amt],parallelPeriod([Sales].[Time].[Time_H].[Year],1,currentMember([Sales].[Time].[Time_H]))) within set [CBU/Product Type Series])'
WHEN 'New Business Premium'
THEN 'aggregate(tuple([Actual Total New Business Premium Amount],parallelPeriod([Sales].[Time].[Time_H].[Year],1,currentMember([Sales].[Time].[Time_H]))) within set [CBU/Product Type Series])'
ELSE 'aggregate(tuple([Actual Sales Amount],parallelPeriod([Sales].[Time].[Time_H].[Year],1,currentMember([Sales].[Time].[Time_H]))) within set [CBU/Product Type Series])'
END#


Please let me know what am i doing wrong here?