Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Setting a table value as a variable value, help!

Hey guys - I have a straight table, with about 10 expressions on it. The last expression in the table tells the user what the lowest value is, of all the expression results.

I have a need, due to issues with the project, to make a button on the sheet to set a variable value. The variable's value should be the value of that "lowest value" expression.

So, the table is called "RC01", and the expression is called "RC01 Min Percentage". The Variable to be set is called "varRC01".

So, what would the expression be, that I should write inside of the button, to set that variable's value?

On paper, it seems like it would be "SET varRC01", but what do I set it as? Is it [RC01 Min Percentage] ? Or should I call the column of the table somehow? But, since the button is outside of the table, wouldn't I have to tell it what table to look at first? Something like: SET varRC01(RC01 'RC01 Min Percentage') ?

Help!

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can't reference expressions or columns in other objects. You need to use the expression itself again. The best way to do that is to put the expressions in variables and use the variables in the objects.

A simple example: You have a chart with an expression sum(Sales). You create an expression vSumSales with as value sum(Sales). You then change the expression in the chart to $(vSumSales). You then want to show the total sales in a textbox. For this you can reuse the variable in the textbox: =$(vSumSale).

You can also reference variables in variables: vMyVar with as value $(vSumSales). If you have several variables with expressions you could create a variable for use in an object and at need set the variable to different a 'expression'-variable.


talk is cheap, supply exceeds demand
Not applicable
Author

Here's my issue, and why I dont think that would work:

I have 10 straight tables. Each has a "min total" at the bottom, to show the minimum value on that table.

Each table has a bar up top, where the user can select a month and year - and the table will change to reflect the month (and the data in that month) that the user selected, as well as the year they selected. So, table 1 might have 100% as the min for January 2013, but if Feb 2012 is selected, it might be 95%.

Here's where it gets tricky - of the 10 tables I have, half of them are based on one calendar we created, and the other half is based off of a DIFFERENT calendar. So, the user has to clear their month / year selections, because if they dont, and they flip from one table to another and the new table is reading a different calendar, the data will be incorrect.

Now, I'm attempting to make a "summary bar chart". this chart needs to show the lowest value for each table. But half of it is always going to be wrong...

Ugh. I'm stuck.