Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

One condition with more than one value

Hello, I'm new to qlikview and I don't know how to translate this oracle query into qlikview query. Can someone please help me to translate this query or give me an explanation regarding IN at qlikview?

Oracle Query :

CASE

                  WHEN TRAN_TYPE IN

                          ('COS', 'ICO', 'ISI', 'ISS', 'IST', 'RSI', 'FAO')

                  THEN

                     TRAN_AMOUNT

                  ELSE

                     0

               END

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

You can use as below

IF(Match(TRAN_TYPE,'COS', 'ICO', 'ISI', 'ISS', 'IST', 'RSI', 'FAO'),TRAN_AMOUNT,0)

View solution in original post

4 Replies
MK_QSL
MVP
MVP

You can use as below

IF(Match(TRAN_TYPE,'COS', 'ICO', 'ISI', 'ISS', 'IST', 'RSI', 'FAO'),TRAN_AMOUNT,0)

Joseph_Musekura
Support
Support

Hi

I was just posting this to you

LOAD TranId, Tran_type, TRAN_AMOUNT Inline [
TranId, Tran_type, TRAN_AMOUNT
1, COS, 500
2, ICO, 300
3, IST, 200
4, none, 400
5, none, 150
]
;

T2:
Load TranId,
   
Tran_type,
   
if (Match(Tran_type, 'COS', 'ICO', 'ISI', 'ISS', 'IST', 'RSI', 'FAO'), TRAN_AMOUNT, 0) as newAmount
Resident T1;

drop Table T1;

PrashantSangle

Hi,

You can use wildmatch() also.

Like

if(wildmatch(TRAN_TYPE,'COS', 'ICO', 'ISI', 'ISS', 'IST', 'RSI', 'FAO'),TRAN_AMOUNT,0)

wildmatch() is incase sensitive function where as match() function is case sensitive.

So go with wildmatch().

Regards,

PS

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Thank you very much