Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I do have a basic table and variables created as below:
Table:
LOAD * INLINE [
CalYrMnthNum, ThisYLM, LastYLM
201607, 201606, 201506
201606, 201605, 201505
];
SET vThisYLM = Max({<CalYrMthNum={"$(=Max(CalYrMthNum))"}>}ThisYLM);
SET vLastYLM = Max({<CalYrMthNum={"$(=Max(CalYrMthNum))"}>}LastYLM);
However, When I try to use the variable as =$(vThisYLM) i do not get any result.
Can anyone suggest what mistake i am doing here?
Please find the attached document.
Regards,
Shyam.
Try this may be:
Table:
LOAD * INLINE [
CalYrMnthNum, ThisYLM, LastYLM
201607, 201606, 201506
201606, 201605, 201505
];
LET vThisYLM = 'Max({<CalYrMnthNum={"$' & '(=Max(CalYrMnthNum))"}>}ThisYLM)';
LET vLastYLM = 'Max({<CalYrMnthNum={"$' & '(=Max(CalYrMnthNum))"}>}LastYLM)';
You have Date field like CalYrMnthNum
Buy, you using CalYrMthNum
Hi,
It is because you do not have same field name in Table and in Variable.
Your variable uses "CalYrMthNum"
Where as your field name is CalYrMnthNum.
Correct it and then try.
Regards,
Kaushik Solanki
Hi Guys,
Thanks heaps for your responses.
Even after renaming the Field name still I have the same issue.
However, the issue seems to be around the $ sign in the load script.
I found a few tips in the link below.
Can I SET or LET a variable to include a $(=...)
Will try and find if any issues. Thanks again.
Regards,
Shyam.
PFA
Try this may be:
Table:
LOAD * INLINE [
CalYrMnthNum, ThisYLM, LastYLM
201607, 201606, 201506
201606, 201605, 201505
];
LET vThisYLM = 'Max({<CalYrMnthNum={"$' & '(=Max(CalYrMnthNum))"}>}ThisYLM)';
LET vLastYLM = 'Max({<CalYrMnthNum={"$' & '(=Max(CalYrMnthNum))"}>}LastYLM)';
Thanks Sunny.