Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gandalfgray
Specialist II
Specialist II

How to display value of variables?

Is it possible to display the value of variables in a Sense app, like it is in QlikView apps?

If it is, how is it done?

If it is not, is it planned for a coming release?

1 Solution

Accepted Solutions
gandalfgray
Specialist II
Specialist II
Author

Thanks Bohua

What I specifically wanted to do was to display variables (along with text) in a textbox.

And that was not as straightforward as in QlikView where you just type, eg  =ScriptErrorCount or ='Errors: '&ScriptErrorCount into the text objects Text box

In QlikView:

QV variables in Textbox.PNG.png

I found this out now, and will explain here for the benefit of others

In Sense:

The text needs to be added as a "measure".

Below is a newly added Text & Image object in Sense.

Even if it looks like it below, you can't click on the + below to add a "measure".

If you click on the + you can only add static text.

To add a "measure" click the "Add measure" button in the right pane:

sense add measure in textbox step 1.PNG.png

Next click on the fx symbol. This is important, you can't just start typing =ScriptErrorCount or something like that. If you do that it will end up being hardcoded text.

sense add measure in textbox step 2.PNG.png


Now you finally come to the "Add expression" box which seems to be the equivalent of the old QlikView text object text box...

And here the Sense behaviour is the same as old QlikView:

sense add measure in textbox step 3.PNG.png


In Sense you can also add several "measures" per Text & image object, and format them differently (font-size, color etc)

Hope this helps someone else!

/gg

View solution in original post

5 Replies
Not applicable

Dear Sir Gandalf the gray,

Yes, you will be able to use dollar expansion to show variables defined in load scripts. For instance,

you have a definition in script: set vBar = 100;

and you can simply use this variable in any expression by: $(vBar)

However, a runtime/system level variable like QlikView is not available yet in 1.0 release. It's on the roadmap of future releases. But exactly in which release, it's not decided.

gandalfgray
Specialist II
Specialist II
Author

Thanks Bohua

What I specifically wanted to do was to display variables (along with text) in a textbox.

And that was not as straightforward as in QlikView where you just type, eg  =ScriptErrorCount or ='Errors: '&ScriptErrorCount into the text objects Text box

In QlikView:

QV variables in Textbox.PNG.png

I found this out now, and will explain here for the benefit of others

In Sense:

The text needs to be added as a "measure".

Below is a newly added Text & Image object in Sense.

Even if it looks like it below, you can't click on the + below to add a "measure".

If you click on the + you can only add static text.

To add a "measure" click the "Add measure" button in the right pane:

sense add measure in textbox step 1.PNG.png

Next click on the fx symbol. This is important, you can't just start typing =ScriptErrorCount or something like that. If you do that it will end up being hardcoded text.

sense add measure in textbox step 2.PNG.png


Now you finally come to the "Add expression" box which seems to be the equivalent of the old QlikView text object text box...

And here the Sense behaviour is the same as old QlikView:

sense add measure in textbox step 3.PNG.png


In Sense you can also add several "measures" per Text & image object, and format them differently (font-size, color etc)

Hope this helps someone else!

/gg

Not applicable

Yes sir,

I see your point, glad that you found solution yourself.

It is a different design and idea in Qlik Sense, variables are presented as 'tokens' in Text&Image Visualizations. What I mentioned for not available yet (but in future vision) is something like Variable Overview in OverQlikView:

2014-10-29 14_41_05-Variable Overview.png

Please mark the discussion as answered if no more questions so that people can recognize this post from icon.


Thanks,


Bohua

gandalfgray
Specialist II
Specialist II
Author

Yes, I understand, the variable overview seems to be missing.

I also saw that you can create and save different kinds of "measures" (also my type of text+variable "measure") as Master Items in the left pane, before you create your text object, and then simply select it when you edit your text object.

awqvuserneo
Creator
Creator

Sir Gandalf & Sir Bohua,

Thank you for sharing this with the rest of us. I was wondering where the "Variable Overview" in QlikSense & this thread helps answer my question.

Cheers,

Anton