Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Test
Hi
You will need a year field and month fields based on your Sales date - lets assume that they are called SalesYear and SalesMonth
LOAD ....
Month(SalesDate) As SalesMonth,
Year(SalesDate) As SalesYear
...
Now to dynamically get the maintenance cost for last year (eg in a text box):
Sum({<SalesYear = {"$(=Max(SalesYear))"}>} Aggr((12 - SalesMonth) * Sum(Sales * 0.2) / 12, SalesMonth))
If you want it in a chart with SalesYear as a dimension:
Sum(Aggr((12 - SalesMonth) * Sum(Sales * 0.2) / 12, SalesMonth, SalesYear))
HTH
Jonathan
you will get number of months left in the year using below expression :
Mod(24-(Num(Month(Today()))),12)
Simply (12 - Month(Today())) will do it