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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
kim_rormark
Partner - Contributor III
Partner - Contributor III

Comparing string variables

Hi,

I am trying to do an "if.. then" on two string variables, but it won't do it for me. Do I have to use something else to do this?

Ex.:

if Peek('Type', $(i), 'Incidents') = "Downtime" then

   ....

endif


Here Peek('Type', $(i), 'Incidents') will return the correct value that I want to compare with "Downtime". In the log-file it shows that the correct values are compared.

Ex. if Downtime = "Downtime" then

I also tried removing and adding quotes in every possible way, and I also tried using the text() function.

Help?

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hei

attach is an example

i tried what you wrote

it seems to work

checkout to any diffrences

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hei

attach is an example

i tried what you wrote

it seems to work

checkout to any diffrences

kim_rormark
Partner - Contributor III
Partner - Contributor III
Author

Of course, single quotes. I though i tried that but obviously not.

Thank you so much!