Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Variable question

Hello!

I am new to Qlik Sense. Trying to create a few button extensions and have the data filter as per the selection of the button. For example, if I click 2017 in one of the button options and select one of the Business Units, the result should get reflected accordingly in the table. I have a few columns/measures in the table.

What I did was create the buttons options, one for Year, one for Business Unit. Then I created variable for Year and Business Unit. Then related the year variable with one of the measures, "Volume" in the Expression Editor. So when I clicked either 2016, 2017 or 2018 the volume would reflect accordingly. That's fine and working.

But I would like the Volume to reflect properly when I click the Business Unit. For that I added the exact same code as "Year" one, just changed it to Business Unit and changed it's variable name too.

Sum({<FY = {$(#vYear)}>}Volume)

Sum({<BusinessUnit = {$(#vBU)}>}Volume)

What am I missing here. Just the first line alone works. Along with the second, I don't get anything!! Please help.

Thank you!!

2 Replies
sasiparupudi1
Master III
Master III

Sum({<BusinessUnit = {"$(vBU)"}>}Volume)


or


Sum({<BusinessUnit = {"$(=vBU)"}>}Volume)

Anonymous
Not applicable
Author

Thank you! But my question is I want two different variables to work...

Business unit is one field, a button that some options.

Year is another field with some options and is also a button

Volume which is a measure should populate based on the Business unit and Year selected. Currently only one field works.

I have this in my Expression editor.

/*Sum({<FY = {$(#vYear)}>}Volume)*/


Sum({<FY = {"$(vYear)"}>}Volume)


/*Sum({<BusinessUnit = {"$(vBU)"}>}Volume)*/

So currently, if I select one of the options of Year, volume is reflected accordingly. My question is how do I make Business unit to work in the same expression editor for Volume. Is the syntax wrong or is it even doable.

Thanks again for helping!