This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
I would like to use buttons as filters to filter my bar chart.
For example, when I select the button 'Events', the bar chart will show me the Events by year month.
So I guess the button should be able to change the measure of the bar chart dynamically based on the selection.
I am not able to use any extensions. so this has to be done by writing expressions and setting up the button.
Could you please help?
This solved my question https://help.qlik.com/en-US/video/gMeaNp21JJo
View solution in original post
Rather than using a button, consider using a field (filter pane). Either way, set up a variable (mine is called vFieldSelection) which sets up a formula attached to the value or button, for example:
if(myField = 'Sales', 'Sum(Sales)', 'Sum(Quantity)')
This would have a list of your measures. You would then create a measure:
If you prefer to use a button you'd just need to use the button to set the variable values, but the same concept will apply.
to achieve you requirement we need to just follow below steps:
i am assuming Dimension as YearMonth field
-> create a variable vSwitch assign value 'event'
-> In your created button add action to set value in variable
-> create two measure in bar chart
Now in measure both the measure go the calculation condition
In event measure calc. condition , put $(vSwitch)='event'
In new buyer measure calc. condition, put $(vSwitch)='new buyer'
you are good to go.
Thanks for your help, but I don't understand this
-> create two measure in the bar chart
--- I do not have a field called event or new buyer, they are the name of my measures.
you can use your show condition in your measure that is already created.
and use variable button to switch between them.
Please let me know if you need a sample qliksense file with example.