Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
pandabear_de
Luminary Alumni
Luminary Alumni

Dynamic Text in Qlik Sense Table - like Python f-string: print(f'My text {Var1}')

Hi

I am trying to put together signals for users based on some kind of data conditions. There will be a set of different rules, that will grow over time. Each rule has a specific explanation text for the user. To handle the data from a multiple rules, a standardized result table is defined.

 

The problem: How can I show the user the explanations containing the data dynamically.

 

Example Data (please ignore if the data makes sense or not!)

[Signal_Results]:

ID, Rule_ID, Val1, Val2
1,1,10,20
2,1,30,40
3,2,5,15

 

[Signal_Static]:

Rule_ID, Explanation
1, Combination A was identified at {Val1} with product {Val2}
2, Temperature Exception was set to {Val1}. Measured {Val2}

 

Required Output in Qlik Sense table:

ID 1 -> Combination A was identified at 10 with product 20
ID 2 -> Combination A was identified at 30 with product 40
ID 3 -> Temperature Exception was set to 5. Measured 15

 

In python this could be solved with a print(f”Combination A was identified at {Val1} with product {Val2}”)

 

How can I dynamically show the descriptions in Qlik Sense without having to output complete descriptions in my Signal_results table?

 

Thanks for your help!

1 Reply
tm_burgers
Creator III
Creator III

I think you can skip the [Signal_Static] table

 

in the table measure expression use the following, 

if(Rule_ID=1,'Combination A was identified at '&Val1&' with product '&Val2,
if(Rule_ID=2, 'Temperature Exception was set to '&Val1&'. Measured '&Val2,' '))

 

if