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

If Statement

I have data like the table below. I need to write a set expression or load flag which says

if  Location ID of IssueReporter = 10003 then Texas

Pomna_0-1606258979240.png

Thanks

 

1 Solution

Accepted Solutions
PrashantSangle

a simple if statement work for you

if([location id]='10003','Texas')

is this you are looking for.? ?? if not then can explain your query in detail, with sample data and expected output..

 

Regards,

Prashant Sangle

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 🙂

View solution in original post

3 Replies
ArnadoSandoval
Specialist II
Specialist II

Hi @Pomna 

You database should have a table with a Locations table, if you load this table, associate its index column with the Location ID column, you may not need to introduce any IF statement, but if you still have difficulties consider introducing a mapping table sourced from the Locations table and implement an ApplyMap()

Hope this helps

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
PrashantSangle

a simple if statement work for you

if([location id]='10003','Texas')

is this you are looking for.? ?? if not then can explain your query in detail, with sample data and expected output..

 

Regards,

Prashant Sangle

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 🙂
Pomna
Creator III
Creator III
Author

Thank you. It worked as expected