Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an Issue with the If Match function, I have a field called Last_Ping_Status and the values are 1 DAY, 2 DAYS, 3 DAYS.....60 DAYS, OVER 60 DAYS and UNKNOWN from this I was trying to display first 7 DAYS (1 DAY, 2 DAYS...7 DAYS) and for that I am using below expression in my Straight Table dimension.
=if(match(Last_Ping_Status,'1 DAY','2 DAYS','3 DAYS','4 DAYS','5 DAYS','6 DAYS','7 DAYS'),Last_Ping_Status)
The above expression is not giving any error but I am not getting anything in the table see below.
I have tried with some sample data in another test qvw but the same if match condition is working there not sure why it is not working in my actual qvw and i have tried with wildmatch as well.
Perhaps the values of "Last_Ping_Status" are not exactly the same as your match condition. The case could be off or leading or trailing spaces. Might try:
if(match(TRIM(UPPER(Last_Ping_Status)),'1 DAY','2 DAYS','3 DAYS','4 DAYS','5 DAYS','6 DAYS','7 DAYS'),Last_Ping_Status)
If the above upper and trim didn't fix the issue, might try the below and examine the output.
if(match(TRIM(UPPER(Last_Ping_Status)),'1 DAY','2 DAYS','3 DAYS','4 DAYS','5 DAYS','6 DAYS','7 DAYS'),Last_Ping_Status, '-' & Last_Ping_Status '-' & ' This should not include values between 1 and 7 days.')
Can you please post your load script? I have the free version of QlikView and can't open the QVF since I am not the creator.
Perhaps the values of "Last_Ping_Status" are not exactly the same as your match condition. The case could be off or leading or trailing spaces. Might try:
if(match(TRIM(UPPER(Last_Ping_Status)),'1 DAY','2 DAYS','3 DAYS','4 DAYS','5 DAYS','6 DAYS','7 DAYS'),Last_Ping_Status)
If the above upper and trim didn't fix the issue, might try the below and examine the output.
if(match(TRIM(UPPER(Last_Ping_Status)),'1 DAY','2 DAYS','3 DAYS','4 DAYS','5 DAYS','6 DAYS','7 DAYS'),Last_Ping_Status, '-' & Last_Ping_Status '-' & ' This should not include values between 1 and 7 days.')
Can you please post your load script? I have the free version of QlikView and can't open the QVF since I am not the creator.
Thank you William, this is working perfectly but why the same working in my sample file with simple if match, in the sample file also i have different values
Glad you got it working!