Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a month column that is defined by Month(Report_dt) as RPT MONTH, which is in the format 'MMM', i.e., 'Jul','Aug', etc.,
I got the latest month into a variable with the help of Peek function as below:
RPT_MNTH:
LOAD
Max([RPT MONTH]) as MAX_RPT_MNTH
Resident RPT;
LET vMaxRPTMnth = Peek('MAX_RPT_MNTH',0,'RPT MONTH');
Now $(vMaxRPTMnth) has a value of 8 for latest month being 'Aug'
I wanted to use this variable in set analysis as below:
Sum({<[RPT MONTH] = {'$(vMaxRPTMnth)'}>}Sales)
But this equation is giving out 0.
I dont want another Month_Num variable/ field having 7,8 for Jul and Aug.
Help appreciated in advance.
Thank You
Ram Marthi
Change to this may be
RPT_MNTH:
LOAD MaxString([RPT MONTH]) as MAX_RPT_MNTH
Resident RPT;