Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have an requirement as below:
Region, Actual Value, Target, UnitOfTime, Date
ABC,123,345,MTD,20200801
DEF,456,789,MTD,20200701
RGR,908,998,MTD,20200601
etc....
i need to calculate the difference of current month actual value and previous month actual value and store the value in a new field in backend script not in front end.
example: current month - 20200801 actual value is 123and previous month value - 20200701 is 456
Current month - Previous month as New field in back end script.
please help me how to write in backend scirpt.
You could do this by sorting on the date and probably the Region.
then create a field within the table like this:
if(previous(Region) = Region, Actual Value- previous(Actual Value),0) AS Difference_with_previous_month
Not sure if this is exactly what you are looking for, but hope it will help you get your solution.