Qlik Community

Qlik Sense Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Announcements
See why Qlik is recognized as a Leader for the 10th year in a row – and discover how Qlik can help put your business in the lead. Get Report
Highlighted
Partner
Partner

Qliksense Variables

Hello anybody knows how to show in GUI controls the value of a calculated variable?

Thanks

Marco

12 Replies
Highlighted
ogster1974
Honored Contributor II

Re: Qliksense Variables

use a text box and set it to =$(<your variable name>) to trouble shoot your variable content at any one time.

Partner
Partner

Re: Qliksense Variables

I have just tried this but it still return the string and not the content variable.

Immagine.png

Marco

Highlighted
ogster1974
Honored Contributor II

Re: Qliksense Variables

If your variable is numeric put it in a KPI object as you have it and it should work.

Highlighted
Partner
Partner

Re: Qliksense Variables

Can you post me a qvf with an example?

Marco

Highlighted
ogster1974
Honored Contributor II

Re: Qliksense Variables

Here you go.

I have a variable set default as 0

using qsVariable extension I have added a button on the page that sets the value as 1,2,3 the KPI is used to display variable value,

Note this will only work with numeric variable values.

Highlighted
Employee
Employee

Re: Qliksense Variables

Can you share the exact variable definition ? If there is a logic error nothing will make it correctly render.

Highlighted
Partner
Partner

Re: Qliksense Variables

So is it possible to debug a date variable?

Marco

Highlighted
ogster1974
Honored Contributor II

Re: Qliksense Variables

If you turned your date into a number for debugging.  using date#() you could use the method I supplied previously.

Highlighted
Partner
Partner

Re: Qliksense Variables

I've tried and using $(variable) it works also for dates.

Another question, i need to get a variable content from a mashup application but using this code (note the variable is a computed date):

app.variable.getContent('variable',function ( reply ) {

  var sTemp = JSON.stringify( reply );

  var json_parsed = JSON.parse(sTemp);

  //alert (json_parsed);

  sTemp = json_parsed.qContent.qString;

  alert("value: "+sTemp);

  } );

i get the variable text value and not the computation of its content, how can i do to get the real content?

Thanks

Marco