- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to subtract current month values with previous month values in straight table with dimension is year and columns as months
Hi,
Can someone help me to solve the below.
I have a straight table which has year as dimension and columns as months. I am trying to calculate variance (current month - previous month) but, facing issues when I am trying to subtract Jan month with dec month values.
Calculation has to be done at row level as per the screenshot and attachments below.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Current month :-
sum({<Year={'$(=year(addyears(yearstart(max([Start Date])),0)))'},Month={'>=$(=month(yearstart(max([Start Date]))))<=$(=month(Max([Start Date])))'},Month=>}value)
Previous month:-
sum({<Year={'$(=year(addyears(yearstart(max([Start Date])),-1)))'},Month={'>=$(=month(yearstart(max([Start Date]))))<=$(=month(Max([Start Date])))'},Month=>}value)
Sub:-Column(1)-Column(2)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply..
My requirement has only month columns and we need to calculate only variance among them.