Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

HELLLLPPPP Please...

Please  I need HELP!

I have a table currency... everything is working fine...

But I have just one Problem, without selecting it should take the USD

I have a problem:

This is my table:

Currency:

LOAD * INLINE [

    LocalCurrency, ExchangeRate

    AUD, 1.0908

    CAD, 1.0187

    EUR, 0.7399

    GBP, 0.6650

    USD, 1.0000

];

My Variable:

vCurrency=MaxString(ExchangeRate)        --->>>> Here is my Problem!

I need something that should take the USD Currency

the MaxString take the AUD, the MinString take the GBP... is logical, but there is nothing to tell take the middle one.. because USD is 1.0000 and it is in the middle so I tried with the median.. but it doesnt work...

How can I fix this Problem.... I need HELP....

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

try to include a "if" condition in your variable as follow:

vCurrency=if(CurrencyCode ='AUD' OR CurrencyCode='CAD' OR CurrencyCode='EUR'  OR CurrencyCode='GBP', maxString(ExchangeRate),1.0000).

Of course this wouldn't be adequate if u had hundreds of Currency codes for instance. Still working on it...

View solution in original post

7 Replies
Not applicable
Author

Hello jenni,

try this expression:

vCurr= FieldValue ( 'ExchangeRate',FieldIndex('LocalCurrency' , 'USD'))

HtH

Roland

Not applicable
Author

in addition to my post above:

vCurr= USD;

vCurrVal= FieldValue ( 'ExchangeRate',FieldIndex('LocalCurrency' , '$(vCurr)'));

This makes it more flexible and better readable, in my oppinion.

RR

Not applicable
Author

First, Thank you Roland for ur help! I've already tried with the FieldValue... and it dosent give me the right output

I am searching for other solution...


I uploaded my app...

what I want it is : like "minString or maxString" to peek the String of USD....

Everything working very well, but I just need, If nobody selecting the currency it should be in USD... Therefore I need somthing like maxString or kind of that...

Could you please have look.... I am lost there...

Not applicable
Author

vCurr= FieldValue ( 'ExchangeRate',FieldIndex('LocalCurrency' , 'USD')) --> that is working well, but then I can't selecting other Currency... because it's fix defined....

Not applicable
Author

Hi,

try to include a "if" condition in your variable as follow:

vCurrency=if(CurrencyCode ='AUD' OR CurrencyCode='CAD' OR CurrencyCode='EUR'  OR CurrencyCode='GBP', maxString(ExchangeRate),1.0000).

Of course this wouldn't be adequate if u had hundreds of Currency codes for instance. Still working on it...

Not applicable
Author

THANK you SO much!!!!!!!!!! ! It's a certification task ... where I was lost... Thanks a lot!!!!!

Not applicable
Author

Your welcome, it’s a pleasure!!