Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have Inline Table As:
Target:
Load * Inline [
%Target, TargetOrder, TDAchieved ,TDTarget
Session,1,'sum({<MonthID={$(=max(MonthID))}>}SpValueDaily)','sum({<IsCurrentMonth={1}>}SpValueDaily)'
];
and in text .. I have a Expression
1: $(=Maxstring(TDAchieved))
2: $(=Maxstring(TDTarget))
But my first Expression is not giving a Value .. Where i am calculating value for max month based on user selection.
if i am Writing my expression Directly sum({<MonthID={$(=max(MonthID))}>}SpValueDaily)
in Text its gives me a Output.. I need how to write same thing in inline table and use as Variable..
Kindly check and help me on this. i as Well Attaching sample data and qvw for the same.
Either how can i write set analysis on script in inline table to get max month on customer selection
The reason why it's not working is that you have a $-sign expansion within your first expression and they will be evaluated during the load and it results in NULL for it - if you have a look within the tableviewer on this table in preview and looked on the result from this field you will see that the expression is umcomplete and therefore couldn't be work within the gui.
One commonly used workaround for these topic is to use another char for it and replace it later, like in this example:
Target:
Load %Target, TargetOrder, replace(TDAchieved, '###', '$') as TDAchieved ,TDTarget Inline [
%Target, TargetOrder, TDAchieved ,TDTarget
Session,1,'sum({<MonthID={###(=max(MonthID))}>}SpValueDaily)','sum({<IsCurrentMonth={1}>}SpValueDaily)'
];
- Marcus
Any other solution to achieve this .. Apart from this one ..Kindly help me on this.
Is there any Response on this ?
The reason why it's not working is that you have a $-sign expansion within your first expression and they will be evaluated during the load and it results in NULL for it - if you have a look within the tableviewer on this table in preview and looked on the result from this field you will see that the expression is umcomplete and therefore couldn't be work within the gui.
One commonly used workaround for these topic is to use another char for it and replace it later, like in this example:
Target:
Load %Target, TargetOrder, replace(TDAchieved, '###', '$') as TDAchieved ,TDTarget Inline [
%Target, TargetOrder, TDAchieved ,TDTarget
Session,1,'sum({<MonthID={###(=max(MonthID))}>}SpValueDaily)','sum({<IsCurrentMonth={1}>}SpValueDaily)'
];
- Marcus
Hi Marcus,
thank you so much for your reply and explanation.. its working now .....:)