Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all ,
I have field like [NonPrdBkp.Monthly Charges] which i stored into variable vInititiavtiveCharges
Now I want to use this variable for following set analysis
vInitiviativeChargesTotal = num(Sum({<[$(vInititiavtiveUpdateStatus)] = {'Review'}>} [$(vInititiavtiveCharges)]),'$#,##0')
I am getting error for this ..
Any body please give suggessions.
Vikas
This sample seems to work.
Script:
Table:
LOAD * Inline [
ABC
1
2
3
4
5
];
Text Box Expression - > =Sum({<$(vVar) = {1, 2, 3}>}$(vVar))
So you have this -> vInititiavtiveCharges = [NonPrdBkp.Monthly Charges] ?
May be try it without the square brackets
vInitiviativeChargesTotal = num(Sum({<[$(vInititiavtiveUpdateStatus)] = {'Review'}>} $(vInititiavtiveCharges)),'$#,##0')
why you required vInititiavtiveCharges and vInititiavtiveUpdateStatus?
Simply try with your field name only..
Total = num(Sum({<FieldName= {'Review'}>} FieldName1),'$#,##0')
Its kinda hard to debug your variables and expression without knowing how the variables are defined...
i am getting error for this set [$(vInititiavtiveUpdateStatus)] = {'Review'}
Again I don't think you should use square brackets around your variable. Try without it.
Note: Expression Editor may still show your red line underneath, but the expression might still work because your variable contains a single field name. I have never tried it, but I have a feeling it should work.
after removing square brackets also it is not working ?
This sample seems to work.
Script:
Table:
LOAD * Inline [
ABC
1
2
3
4
5
];
Text Box Expression - > =Sum({<$(vVar) = {1, 2, 3}>}$(vVar))
Hi Vikas,
What you are doing should, in principle, work, but you need to check your variable is parsing out to a field name, rather than the contents of the field.
You should double check what your variable $(vInititiavtiveUpdateStatus) actually contains. Try putting the variable into a text box. Does it parse out to exactly your field name [NonPrdBkp.Monthly Charges]? What I suspect you will get in your text box is a - (dash). Try then putting =concat($(vInititiavtiveUpdateStatus),',' ) into the text box. Do you see the entire contents of field? If so, then you need to go back to your logic and make sure you are storing the field name in your variable, rather than the contents of your field.
I hope that helps.
George
Thanks all for Reply...
Vikas