Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

match command how to add 2nd condition ?

Hi All

I have created the expression below which match 1 CONDITION IF COUNTRY = SG ( WORKING FINE ):-

if(match(Currency_P,'SG'),

money(

(AFTER_DISCOUNT*RATE_EU*TRANS_SUP/MU_TDS),

CurrencyFormat_P)

)

Now I need to add one more condition :-

BRAND_P=GE

I try :-

if(match(Currency_P,'SG') and (BRAND_P,'GE'),

money(

(AFTER_DISCOUNT*RATE_EU*TRANS_SUP/MU_TDS),

CurrencyFormat_P)

)

it does not work , hope some one can help me.

Paul

1 Solution

Accepted Solutions
maxgro
MVP
MVP

maybe you have to add another match (bold)


if(match(Currency_P,'SG') and match(BRAND_P,'GE'),

..................

View solution in original post

4 Replies
paulyeo11
Master
Master
Author

QV doc

maxgro
MVP
MVP

maybe you have to add another match (bold)


if(match(Currency_P,'SG') and match(BRAND_P,'GE'),

..................

paulyeo11
Master
Master
Author

Hi Massimo

Thank you very much it work fine now .

Now i hv following up question :-

I have 2 script , 1st one is  :-

if(match(Currency_P,'SG') and (match (BRAND_P,'GE')),

(AFTER_DISCOUNT*RATE_US*TRANS_SUP/MU_TDS)

)

and 2nd one is :-

if(match(Currency_P,'SG') and (match (BRAND_P,'IBH')),

(AFTER_DISCOUNT*RATE_EU*TRANS_SUP/MU_TDS)

)

I want to combine both into 1 script :-

if(match(Currency_P,'SG') and (match (BRAND_P,'GE')),

(AFTER_DISCOUNT*RATE_US*TRANS_SUP/MU_TDS)

)

if(match(Currency_P,'SG') and (match (BRAND_P,'IBH')),

(AFTER_DISCOUNT*RATE_EU*TRANS_SUP/MU_TDS)

)

paulyeo11
Master
Master
Author

Hi Massimo

I found the answer by trail and error , and it work :-

if

(

match(Currency_P,'SG') and (match (BRAND_P,'IBH')

),

(AFTER_DISCOUNT*RATE_EU*TRANS_SUP/MU_TDS),

if(match(Currency_P,'SG') and (match (BRAND_P,'GE')),

(AFTER_DISCOUNT*RATE_US*TRANS_SUP/MU_TDS)

)

)