Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using the following expression to sum the the sales for the next four weeks from last year.
=Sum({<Chron_Week = {"$(dMaxChronWeek-52)"},Fy_Wk=,FY_Year=>}Units_Sold)+ Sum({<Chron_Week = {"$(dMaxChronWeek-51)"},Fy_Wk=,FY_Year=>}Units_Sold)+ Sum({<Chron_Week = {"$(dMaxChronWeek-50)"},Fy_Wk=,FY_Year=>}Units_Sold)+ Sum({<Chron_Week = {"$(dMaxChronWeek-49)"},Fy_Wk=,FY_Year=>}Units_Sold)
The expression is working fine and giving the expected result.
Because I am going to be using the same expression in multiple tables, I have converted it to a variable:
dUnitsLY+4weeks
However, when I write this variable in the expression as $(dUnitsLY+4weeks), I get the overall number(914) listed for every customer and not the customer's individual sales for that period. When I use the extended expression (as above) it does results for individual customers.
Can some please explain why the expression is giving a different result when wrapped in the variable?
Thanks in advance!
Cheers,
Nick
While defining the variable, remove the preceding '=' and try.
While defining the variable, remove the preceding '=' and try.
Works a treat.
Thanks tresesco