Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Morning All,
I have a issue in getting the previous month data
For example the "Stement Date" which contains all dates of the year.
I wrote in the script as Month(Statment Date) as StMonth, for Year(Statement Date) as StYear.
What I need is I would like to get the previous month Statement date details like pressing the previous month button.
Can anybody know how to do this?
Regards
Joe
Good morning Joe.
Do you want to load previous month as additional field in the Load Script? I mean your StMonth field represents current montha and you wanted the StPreviousMonth? If this is what you need then you use something like this...
(Num(Month([Statment Date])) -1) AS StPreviousMonth
Good luck!
Cheers - DV
Hi:
You may want to do it using variables.
ActualMonth = max(Month)
LastMonth = max(Month)-1
and then:
sum({$<Month={$(ActualMonth)} >} Sales)
sum({$<Month={$(LastMonth)} >} Sales)