Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to insert eXCHANGE field into my SET analysis ?

Hi All

I have using load script to create a field name eXP :-

If([Reporting Code]>=100 and [Reporting Code]<=374,'eXP') as [eXP],

And i make use of the expression to plot the eXP amount chart , it work fine :-

Sum({<eXP={"eXP"}>}Amount)/1000

Now i create another load script field name eXCHANGE :-

If([Reporting Code]>=175 and [Reporting Code]<=175,'cXCHANGE') as [eXCHANGE],

Now i like to insert eXCHANGE into below script :-

Sum({<eXP={"eXP"}>}Amount)/1000

I Try below , cannot work  :-

Sum({<eXP={"eXP"},eXCHANGE='eXCHANGE'>}Amount)/1000

Paul

4 Replies
petter
Partner - Champion III
Partner - Champion III

Try changing the eXCHANGE in the constant to cXCHANGE or vise versa there seems to be a mis-spelling of some sort:

Either this statement has to be changed from this:

     If([Reporting Code]>=175 and [Reporting Code]<=175,'cXCHANGE') as [eXCHANGE],

to

     If([Reporting Code]>=175 and [Reporting Code]<=175,'eXCHANGE') as [eXCHANGE],

Or

This has to be changed from this:

     Sum({<eXP={"eXP"},eXCHANGE='eXCHANGE'>}Amount)/1000

to this:

     Sum({<eXP={"eXP"},eXCHANGE='cXCHANGE'>}Amount)/1000

vincent_ardiet
Specialist
Specialist

Hi Paul,

If you want to have the amount for those in one categorie AND the other:

Sum({<eXP={"eXP"},eXCHANGE={'eXCHANGE'}>}Amount)/1000

If you want to have the amount for those in one categorie OR the other:

Sum({<eXP={"eXP"}>+<eXCHANGE={'eXCHANGE'}>}Amount)/1000

Regards,

Vincent

jagan
Luminary Alumni
Luminary Alumni

Hi Paul,

Try this expression

Sum({<eXP={"eXP"},eXCHANGE={'eXCHANGE'}>}Amount)/1000


You missed the parenthesis for eXCHANGE.


Hope this helps you.


Regards,

jagan.

paulyeo11
Master
Master
Author

‌HI All

many thank for all sharing

i will try out tomorrow