Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need help...
I want to calculate current month and previous month. Eg. Suppose all data is selected then values show current month(May) data and previous month(April) data, and if user click on April month filter then variable need to show current month as April and previous month as March. Hope you understand the requirement.
your requirement is clear and classic but this should be done in restitution part inside expressions depending what you need to calculate using set analysis
please have a look at this: Set Analysis Current Month vs Previous Month
else precise your data and what you need to calculate, sum, count...
create this variable on load script:
et vPriorMonth = '=month(addmonths(max(GasDay),-1))';
let vPriorMonthYear = '=Year(addmonths(max(GasDay),-1))';
Then I used this for finding the last month charges
=SUM({<Year={'$(vPriorMonthYear)'},Month={'$(vPriorMonth)'}>} SalesValue)
Vikas