Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Pongsakon_J
Contributor
Contributor

Wildmatch and If ()

Hi,

I want to know how to apply this expression IF(FIND("HO1",UPPER([Field_Text]))<>"",VALUE([Field_Date])+VALUE([Field_Time]),"") in excel file to qlik sense

 

Now I used the If(len(WildMatch(UPPER([Field_Text]),'HO1'))=0,Null(),timestamp(Date#([Field_Date], 'MM/DD/YYYY')+Time#([Field_Time], 'hh:mm'), 'DD/MM/YYYY hh:mm')) but this expression is not working.

Could you please fix this formula?

Thank you

Labels (1)
5 Replies
tresB
Champion III
Champion III

Try like:

 If(WildMatch(UPPER([Field_Text]),'*HO1*')) , timestamp(Date#([Field_Date], 'MM/DD/YYYY')+Time#([Field_Time], 'hh:mm'), 'DD/MM/YYYY hh:mm')) 

Pongsakon_J
Contributor
Contributor
Author

tresesco,

Thank you, I'm using your expression but the data shown null in all row, although the data in Field_Text have 'HO1' in text.

tresB
Champion III
Champion III

The problem could lie in other part of your expression, let's figure that out. Try this:

 If(WildMatch(UPPER([Field_Text]),'*HO1*')) , 'Found') as Test

 

If you find 'Found' is appearing, you are sure that the issue is with date#()...

Pongsakon_J
Contributor
Contributor
Author

tresesco,

Yes, 'Found' is appearing.

but now I don't know how to show Date and Time on some Field in this Field

tresB
Champion III
Champion III

Now it's about getting your timestamp fields rightly loaded. You need date#() or time#() when your fields are read by qlik as strings. However, there is a chance that they are actually being read as timestamp and then you don't need to parse them. You could just try like:

timestamp([Field_Date] +[Field_Time], 'DD/MM/YYYY hh:mm')