Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

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
MVP
MVP

Re: How to insert eXCHANGE field into my SET analysis ?

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
Contributor III

Re: How to insert eXCHANGE field into my SET analysis ?

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

MVP
MVP

Re: How to insert eXCHANGE field into my SET analysis ?

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
Valued Contributor II

Re: How to insert eXCHANGE field into my SET analysis ?

‌HI All

many thank for all sharing

i will try out tomorrow

Community Browser