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: 
lahpro
Contributor
Contributor

conditional expression

Hi all, 

I have a straight table with multiple expressions from which each should be visible as soon as the users selects a certain field from a search object / list box. The user may take multiple selections  to show multiple expressions in one chart.

To achieve this I use the following condition: index(GetFieldSelections(Dimension),'Fieldname') > 0

However, if the user clicks a fieldname that includes a word that is simultaneously the fieldname of another expression both expressions get visible although one fieldname has been selected. 

 

Example: 

User's field selection: sales after cancellation

Expression 1 has the condition: index(GetFieldSelections(Dimension),'sales') > 0

Expression 2 has the condition: index(GetFieldSelections(Dimension),'sales after cancellation') > 0

Both expressions are visible. 

Expected outcome: Only expression 2 should be visible. 

 

Renaming of fieldnames is no option. Do you have any idea how to solve this problem?

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

To avoid such issues, you could use special characters in concatenation like:

 

 index('@'&GetFieldSelections(Dimension, '@')&'@','@sales@')

 

 index('@'&GetFieldSelections(Dimension, '@')&'@','@sales after cancellation@')

 

 

View solution in original post

1 Reply
tresB
Champion III
Champion III

To avoid such issues, you could use special characters in concatenation like:

 

 index('@'&GetFieldSelections(Dimension, '@')&'@','@sales@')

 

 index('@'&GetFieldSelections(Dimension, '@')&'@','@sales after cancellation@')