Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Here is my expression :
vFY0 = 2023 , vFY1 = 2024 , vFY2 = 2025 .....
vMonthNumber = 09
If(Sum({<[Fiscal Year]={'$(vFY0)'},$(vMonthNumber)>} SALES),
If(Sum({<[Fiscal Year]={'$(vFY1)'},$(vMonthNumber)>} SALES),
If(Sum({<[Fiscal Year]={'$(vFY2)'},$(vMonthNumber)>} SALES),
If(Sum({<[Fiscal Year]={'$(vFY3)'},$(vMonthNumber)>} SALES) ,
If(Sum({<[Fiscal Year]={'$(vFY4)'},$(vMonthNumber)>} SALES) )))))
How can I rewrite this in the load script without using variables & set analysis ?
Like this possibly?
FinalTable:
LOAD [Fiscal Year],
Month,
Sum(Sales) as Sales
Resident tmp
Where Month= '09'
and
(Year([Fiscal Year]) >= Year(Today()) and Year([Fiscal Year]) <= Addyears(Today(),5))
Group By [Fiscal Year], Month;
DROP Table tmp;