Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I am having issues defining variables in load script.
Referring this post variables within variables in load script I defined variables like below:
Set Month_L3M=AddMonths(Max(Month_Year),-3);
Let v3Months=Replace('Aggr(only({<Month_Year={">=@(Month_L3M)"}>}WeekYear), WeekYear)', '@', Chr(36)); //Double quates in the filter condition
OR
Let v3Months=Replace('Aggr(if(Num(Month_Year)>''@(Month_L3M)'',WeekYear),WeekYear)', '@', Chr(36)); // 2 single quotes in the if condition
but both of the above are not working for me. I have tried both Let and Set but nothing works. Any help would be great. Thanks.
Regards,
Tauceef
Maybe you are missing an equal sign
Let v3Months=Replace('Aggr(only({<Month_Year={">=@(=Month_L3M)"}>}WeekYear), WeekYear)', '@', Chr(36)); //Double quates in the filter condition
Maybe you are missing an equal sign
Let v3Months=Replace('Aggr(only({<Month_Year={">=@(=Month_L3M)"}>}WeekYear), WeekYear)', '@', Chr(36)); //Double quates in the filter condition
Hi Lorenz,
Thank you for your prompt response. That really helps, I have updated my script to below and it works. Just that I have to use 2 single quotes instead of double quotes and it is working with If condition only:
Replace('aggr(if(Num(Month_Year)>''@(=Month_L3M)'',WeekYear),[WeekYear])','@',chr(36));
Regards,
Tauceef