Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have below expression, i need to put in variable in script loader.
count({$<Names_of_day={'Mon'},MonthPeriod_Runrate={'$(=month(weekend(Max(CanonicalDate)))& year(weekend(Max(CanonicalDate))))'},
Date_Runrate={">=$(=Date(Min(Date_RunRate)))<$(=Date(Today()))"}>}Names_of_day)
I tried
Let vNum_Mondays_Passed = 'count({$<Names_of_day={''Mon''},MonthPeriod_Runrate={"<$' &'(=month(weekend(Max(CanonicalDate)))& year(weekend(Max(CanonicalDate))))"},
Date_Runrate={">=$' &'(=Date(Min(Date_RunRate)))<$' &'(=Date(Today()))"}>}Names_of_day)';
But not working properly, it gives me Zero count. How to do this????
Thanks Sunny.
My expression should be like this, with variable overview i was able to check syntax of my Expression.
Let vNum_Mondays_Passed = 'count({$<Names_of_day={''Mon''},MonthPeriod_Runrate={"$' &'(=month(weekend(Max(CanonicalDate)))& year(weekend(Max(CanonicalDate))))"},
Date_Runrate={">=$' &'(=Date(Min(Date_RunRate)))<$' &'(=Date(Today()))"}>}Names_of_day)';
I was using extra angle brackets after dollar sign of MonthPeriod_Runrate. So i was not able to get count
Have you checked the variable overview to see if after reloading the script, the variable definition gives you the exact match as your original expression?
Try this,
set vNum_Mondays_Passed = count({$<Names_of_day={"Mon"},MonthPeriod_Runrate={'$(=month(weekend(Max(CanonicalDate)))& year(weekend(Max(CanonicalDate))))'},
Date_Runrate={'>=$(=Date(Min(Date_RunRate)))<$(=Date(Today()))'}>}Names_of_day)
-abdul
Hi,
Thanks for reply
sorry, i didnt get you.
How to check variable overview?
This thing
Hi Supriya,
To check the variable overview you need to go to settings and look for Variable Overview (Ctrl+Alt+V) is short cut. Also Sunny wants you evaluate your variables before you try them in set analysis expression.
To check you variable, you can test in Text box writing that variable and see what is the result. go one by one you may get the error prone area.
Hi Supriya,
may be this is the format issue ,just check (MonthPeriod_Runrate,Date_Runrate,CanonicalDate)
Thanks Sunny.
My expression should be like this, with variable overview i was able to check syntax of my Expression.
Let vNum_Mondays_Passed = 'count({$<Names_of_day={''Mon''},MonthPeriod_Runrate={"$' &'(=month(weekend(Max(CanonicalDate)))& year(weekend(Max(CanonicalDate))))"},
Date_Runrate={">=$' &'(=Date(Min(Date_RunRate)))<$' &'(=Date(Today()))"}>}Names_of_day)';
I was using extra angle brackets after dollar sign of MonthPeriod_Runrate. So i was not able to get count
I am glad you were able to figure it out