Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
pdwatt_qlik
Contributor
Contributor

Using Variable Names loaded in a Table to display results in a chart

I have created an inline table with embedded variable names. I would like to display the result of the variable in a chart/table.

load script:

Reporting:

Load * INLINE

[

Row_Sort, Row, Variable

1, 'Cy Sales', vCySales

2, 'Py Sales', vPySales

];

I would like to create a tables that shows:

Row                    Variable

Cy Sales               150,056

Py Sales               201,004

Instead I am getting the names.

I've tried a few options like:

=$(=Variable)

=$(Variable)

="$(Variable)"

=[$(=Variable)]

Any ideas?

5 Replies
pdwatt_qlik
Contributor
Contributor
Author

I've attached a simple example of what I'm trying to achieve.

Cheers.

jerifortune
Creator III
Creator III

May be this video could assist.Adding a variable button in Qlik Sense - Qlik Tuesday and Tricks - YouTube

Another good Tutorial here

pdwatt_qlik
Contributor
Contributor
Author

Thanks but the question is not around using Variables in Buttons. It's around having it come in as a data value and evaluating the existing Variable based on that value within a chart.

jerifortune
Creator III
Creator III

Try wrap the variable expansion with single quote eg.  '$(Variable)'

arunaerra
Partner
Partner

Hi

Try below expression:

=if(Variable='vCySales', $(vCySales),$(vPySales))