Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
379SSS
Contributor III
Contributor III

Dynamic labeling

Hi All,

I want to make a dynamic labeling as per variable values.
I have variable (vView) which consists of  values as  'NOC', 'POC' and 'NOC,POC' , Also these are the column values of a filed.

Now when I select on toggle button the filed Name should dynamically change as per the above values selection.

I tried in many ways but this troughing me error. 

1. '2019 & $(vView) & 'Orders'  - Not working, showing me error in Expression
2.' $(='2019' & $(vView) & 'Orders')' - Not working
3.if (match($(vView),'NOC','POC'), '2019 NOC,POC Orders',  if ($(vView) = 'NOC','2019 NOC Orders',if ($(vView) = 'POC','2019 POC Orders'))) - Not working
4.chr(39)&'2019'& chr(39)&','& chr(39)& $(vView) &chr(39)&','& chr(39)&'Orders'& chr(39) - Not working

If any can help me here to sort out this issue will be very much appreciated.

Thanks in advance.

 

1 Solution

Accepted Solutions
marcus_sommer

Yes, of course. The variable contains a comma. You may try it with:

 = '2019 ' &  vView  & ' Orders'     or     = '2019 ' & 'vView'  & ' Orders'

Otherwise change the delimiter from comma to another char or like previously suggested replace the variable-approach with a selection-logic. Beside this such dynamically label is superfluous because the variable respectively by using selections the set value will show which data are included. 

View solution in original post

4 Replies
marcus_sommer

Try it with: = '2019 ' & '$(vView)'  & ' Orders'

379SSS
Contributor III
Contributor III
Author

This is working if varaible has single value like

'NOC' - woking
'POC' - woking

'NOC,POC' - its giving me error 

marcus_sommer

Yes, of course. The variable contains a comma. You may try it with:

 = '2019 ' &  vView  & ' Orders'     or     = '2019 ' & 'vView'  & ' Orders'

Otherwise change the delimiter from comma to another char or like previously suggested replace the variable-approach with a selection-logic. Beside this such dynamically label is superfluous because the variable respectively by using selections the set value will show which data are included. 

379SSS
Contributor III
Contributor III
Author

Thanks @marcus_sommer  This is working. 
I wonder why I miss this small Logic, but thanks for saving my time.