Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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

 

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

 

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