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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
nix1
Contributor
Contributor

Setting a variable based on another variable

I have set up two variables in the variables overview of my sheet.

Selected_City =only({<City = {$(Selected_City)}>} )

Selected_Region==only({<City={$(Selected_City)}>} Region)

 

This is so I can compare city progress to regional progress to global progress in a graph.

However, when my selected city is a string with a space (e.g. Hong Kong) the selected_region variable doesn't work.

Is there anyway I can get it to recognise the string? 

 

 

1 Reply
PrashantSangle

hi,

 

try with double quote for that

like

Selected_Region==only({<City={"=$(Selected_City)"}>} Region)

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 🙂
Community Browser