Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Calculate past 3 months total sales in stright table?
Datamodel:
Month sales
Dec. 500
Jan. 600
Feb. 800
Mar. 700
Apr. 400
I write below expression to get past three months total sales.
Sum({<Month_Num = {">=$(=AddMonths(Max(Month), -2)) <=$(=Max(Month))" >} Sales)
If month field available Dec and Jan like that. So how to convert to date.
My requirement calculate past 3 months sales.
Thanks
Chaitanya
Hi,
Do you have Year Field in the Data Model?
Thanks,
Mukram
Do you have Numeric Month field it is shown in your expression let me know what fields you have.
If you have Numeric Month Field that try this way
Sum({< Month_Num= {">=$(=(Max(Month_Num)-2)) <=$(=Max(Month_Num))"} >} Sales)
Hi anand I don't have numeric month field. If any way to convert my data into numeric date.
In your load script where you have Month filed put this line
Load
Num(Month(Month)) as NumMonth
From Source;
Ohh not this
Load
Num(Month(Month)) as NumMonth
Num(Month) as NumMonth
From Source;
How you want to convert date if Dec is month?