Cognos Calculate Variance Crosstab (Dimensional)

夙愿已清 提交于 2019-12-06 13:28:38

I hope there is a better way to do this. I finally found a resource that describes one approach to this problem. Using the tail and head functions, we can get to the first and last periods, and thereby calculate the % variance.

item(tail(members([Day])),0)
/
item(head(members([Day])),0)
-1

This idea came from IBM Cognos BI – Using Dimensional Functions to Determine Current Period.

Example 2 – Find Current Period by Filtering on Measure Data

If the OLAP or DMR data source has been populated with time periods into the future (e.g. end of year or future years), then the calculation of current period is more complicated. However, it can still be determined by finding the latest period that has data for a given measure.

item(tail(filter(members([sales_and_marketing].[Time].[Time].[Month]),
 tuple([Revenue], currentMember([sales_and_marketing].[Time].[Time]))
 is not null), 1), 0)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!