Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Input box 2 line how to reduce to 1 line using expression ?

Hi All

I have input Box , now need to use 2 line to display the exchange rate , i hope it can just using 1 line.

if user select BRAND_P=GE or HAKKO , display USA_SGD

if user select BRAND_P=BECKHOFF , display EURO_SGD

My exchange rate field is define by :-

lET EURO_SGD = 1.8;

lET USA_SGD = 1.4;

I follow example given by SOK :-

=

If(Match(BRAND_P,'GE'),TRANSPORT_GE,

If(Match(BRAND_P,'BECKHOFF'),TRANSPORT_BK,

TRANSPORT_HAKKO))

Below is the expression i imagine , it cannot work :-

If(Match(BRAND_P,'GE'),USA_SGD,

If(Match(BRAND_P,'BECKHOFF'),EURO_SGD,

USA_SGD))

Hope some one can help me.

Paul

1 Solution

Accepted Solutions
tresesco
MVP
MVP

PFA.

use expression like below for the variable v_Display_Exchange:

=Pick(Match(BRAND_P,'GE','BECKHOFF'),USA_SGD,EURO_SGD)

View solution in original post

4 Replies
Not applicable
Author

Hi All

Can some one advise me on this ?

Paul

tresesco
MVP
MVP

PFA.

use expression like below for the variable v_Display_Exchange:

=Pick(Match(BRAND_P,'GE','BECKHOFF'),USA_SGD,EURO_SGD)

Not applicable
Author

Hi Paul,

  PFA..........Hope it will help you..........

Regards,

Nirmal.

Not applicable
Author

Hi Nirmal

Thank you very much for your sharing . you approach work fine. But the Tres solution is more neat :-

=Pick(Match(BRAND_P,'GE','BECKHOFF','HAKKO'),USA_SGD,EURO_SGD,USA_SGD)

Paul