Qlik Community

Qlik Sense Documents & Videos

Documents & videos about Qlik Sense.

Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today

Cycle Measures across multiple charts using buttons or a dropdown

New Contributor III

Cycle Measures across multiple charts using buttons or a dropdown

Cycling measures in multiple charts showing different dimensions can be a powerful analysis approach in Qlik dashboards. Whilst this has not quite made it into the product there is a very simple workaround that enables you to get all of your charts dynamically changing. This can used for both dimensions and measures (see this link for an example using cyclic dimensions).

Here's a quick example (plays 2 times)


Steps to implement

> Download and install the QSVariable extension from Branch (or see attached for the version at the time of writing).

> To create a cyclic measure:


1. Specify a variable name. If you have not already created this variable it will create it in the application.

2. Select Button or Select (dropdown) in the 'Render as' option. You can also experiment with the style and width setting to get different effects.

3. Click 'Add Alternative'

4. Enter in the calculation expression (you cannot reference master library measures) in the 'Value' area and a Label for the expression option you want to setup.


If you are cycling through measures that require different formats, e.g. a number and a %, then you will need to format mask each expression you enter here. For example:

num(sum(Sales),'#,##0')for a number
num(sum(Profit)/sum(Sales),'#,##0.0%')for a percentage

5. Repeat steps 3 and 4 for each additional expression you wish to show and switch between.

6. Enter the default value for the variable so that a selection is always made on open. The default value will be one of the expressions you entered in step 4 e.g. num(sum(Sales),'#,##0')  

7. Create a measure in your master items (or reference directly in each chart) using the variable reference as $(VariableName).

Known Limitations

> We are unable to dynamically label dimensions and measures at this stage (as of writing after release of v3.1). As such you have generic naming of the dynamic field.

See the attached example for more details or comment below.


New Contributor II

I find this will be one of the most useful extensions I have found so far, but am having an issue I cannot figure out.  I did get the Dimension to work, but when I set up the Measure exactly as you have it here is what happens.  When I open the sheet initially it works perfect.  As soon as I change the button Measure the bar graph displays the same amount for all entries within the dimension.  This amount is the total of all of what all of these entries should be.  Any help would be appreciated.

New Contributor III

Hi Michael,

That would suggest that the dimension you are showing is not joined to your data. I would review your data model to check that all of the appropriate joins are made between your tables.

Alternatively attach an example application and I'll take a quick look.


New Contributor II

I exported the qvf file but not sure how to attach to this comment.  There is no option to do this.

New Contributor III

Bottom right hand corner of the edit window should allow you to attach something if I recall correctly.


New Contributor II

Unfortunately I cannot add attachments for threads of "Documents".  Although I will keep testing the Extension with Measures and figure it out sooner or later.  It is still a very useful tool.

I believe my data is joined properly since all of my other reports work as I would expect.  I will just have to strip away some of my script and rebuild it little by little to see where the problem lays.

Visitor II

Having the same issue. It has nothing to do with the join between tables, because showing Sales data entries in a time dimension works without qsVariable. But when using qsVariabel it doesn't work.

It's like, when using the extension, data entries can't be put in time.


I have tried a couple of these extensions (there are 2 zip pkgs with the same code essentially).  Neither one shows the buttons as you have displayed above.  The buttons are all squished together.  How do I get

them to look like you are showing above in your app?  When I download your app and open it, they look like this


New Contributor III

Hi Mary Jo,

This has happened to me in a previous version. The buttons you have are default html buttons as the css is not being picked up. An upgrade resolved it for me so what version are you currently running?

I also don't follow your comment re two zipped files as the attached version doesn't have this?


Honored Contributor

Good post! I have described another way to do this in my blog here:

Add flexibility to your Qlik Sense app with variables and pick() – Extending Qlik


Version history
Revision #:
1 of 1
Last update:
‎2016-09-22 07:40 AM
Updated by: