Qlik Community

New to Qlik Sense

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

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Bukan4x4
Contributor III
Contributor III

Variable Input by measure

Hello all,

Recently I discovered the "variable input" from the last Qlik bundle. I wanna use it for the end user can manipulate the data in the app and see the effect in a chart.

The chart show 2 measures by year,  Measure1 is load from a data base, Measure 2 is calculated using "variable inputs" in App (in real time). The idea is put this data in a bar chart:

Measure1 Year
10var12019
15var22020
5var32021
20var42022

 

The expressions in qlik chart are:

-Dimension = Year,

-firts measure is = sum(Measure1)

Second measure: ? ?? I don't know how express one varible by each year.

Can help me please?

Thanks for advance.

 

 

 

 

 

 

 

 

 

 

Labels (1)
3 Replies
Mauritz_SA
Partner
Partner

Hi there

What would you like to control using your second variable? And what values will you give it using the Variable Input extension?

Regards,

Mauritz

Bukan4x4
Contributor III
Contributor III
Author

Hi Mauritz,

The second measure is: Stock value (read from database) + variable value (read from variable input ). The attached image maybe explain bette the idea.

Regards

Jorge

Mauritz_SA
Partner
Partner

Hi Jorge

I think I understand what you want to do. You can either add it as an inline table in the load script and concatenate it on your Year field or use a config file (instead of an inline table). I am on my phone now, but you can have two columns in this inline table, first column called Year (values 2019, 2020, 2021, 2022) and second column called Variables (values var1, var2, var3, var4).

For your second measure you can then use something like =[Stock Price] + $([Variables])

You might need to put $([Variables]) in single quotes (I'm not close to my PC now so I can't test). Then you just create variables var1, var2, var3 and var4 and you can give them values using the variable extension.

I hope this helps.

Regards,

Mauritz