Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Cycle dimensions using a variable button or dropdown

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
richbyard
Contributor III
Contributor III

Cycle dimensions using a variable button or dropdown

Last Update:

Sep 22, 2016 6:51:35 AM

Updated By:

richbyard

Created date:

Sep 22, 2016 6:51:35 AM

Attachments

Cycle dimensions that change multiple objects with one selection have been a powerful tool in Qlik visualisations and 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 measures).

Here's a quick example (plays 2 times)

cycle-dimension.gif


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 dimension:

Capture.PNG

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 Value and the Label for the option you want to setup. The 'Value' will be passed into the variable and so this should match your fieldname identically (i.e. case sensitive and use square brackets where there is a space in your fieldname e.g. [Customer Name])

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

6. Enter the default value for the variable so that a selection is always made on open.

     a. In the Edit sheet window, click on the following button in the bottom left.

Variable.JPG

     b. In the Variable window that pops up, click on the edit icon of the variable you wish to update.

Variable1.JPG

c. Enter the Value that will be the default value for your variable. Ensure that it is one of the values that you have entered in the variable extension object. When done click on the edit button again to save and close the window.

Variable2.JPG

7. Create a dimension 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.

Thanks

Comments
mjtaft2017
Partner - Creator
Partner - Creator

This is not working when deployed to Qlik Sense server - any idea why?  It works on my desktop.  I really like this extension and want to use it.

0 Likes
ArnadoSandoval
Specialist II
Specialist II

Hi Maria,

Are you using the same version of Qlik Sense Desktop and Server?

There are some comments by the author at Qlik Branch, here

It is working for us, we are using QS Desktop June-2017 version and QSE Server June-2017 version.

0 Likes
richbyard
Contributor III
Contributor III

Hi Maria,

Similarly to Arnaldo my version is working... However, perhaps try downloading the latest version of the qsVariable extension from Branch as the version I attached here is older.

In fact, that's a good point and I will remove the attachment and just place a link instead as it's a while since I wrote this post.

Hopefully this resolves your issue.

Thanks
Richard

0 Likes
prananellutla
Creator
Creator

Hi Richard, can we have an option to multi select?

iam using a line chart and have 7 measures.

measure 1- iam passing it as variable 'metric' 1

measure 2 as 2

measure 3 as 3

and so on----measure 7 as 7

var1.jpg

and i have a if stmt

if metric=1,then measure1

if metric =2 then measure 2--------if metric =7 then measure 7

i want to select multiple measures

an ability to select measure 1 and measure 2 or

measure 2 and measure 3

or any possible combinations of 7 measures.

thanks

0 Likes
richbyard
Contributor III
Contributor III

Hi Pranahitha,

I think you'd need to set up multiple variables to capture each selection (i.e. measure1, measure2 etc) using this approach..

If you wish to select multiple from a single dropdown you would need to look at a field in your dataset (an island table which is not connected to the rest of the data) where the user could select multiple. This can then be used through conditions in your expressions to assign these selections to each of your measures in your table..

prananellutla
Creator
Creator

Thankyou Richard.

I will check with our back end support anyways regarding measures table.

Prana

0 Likes
mjtaft2017
Partner - Creator
Partner - Creator

The server version was Qlik Sense R3.2 SR4.  I am sure that is the issue.

Sorry for the delay.

Thank you.

0 Likes
ErikWetterberg

Good post!

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

http://extendingqlik.upper88.com/add-flexibility-to-your-qlik-sense-app-with-variables-and-pick/

Erik

0 Likes
paulyeo11
Master
Master

Hi Erik

Thank you for sharing this interesting post . May I know does it support cloud ? As I have using for Qlik Branch a lot , only issue is now all the Qlik Branch does not support the cloud. Do you have any hints when it will be get support ?

Paul Yeo

DIrector

TDS Technology (S) P/L

Whatsapp +65 9326 1804

www.tdstech.com<http://www.tdstech.com>

0 Likes
ErikWetterberg

Hi,

No I'm afraid I don't know when it will be supported in cloud. I do know that it's on the list of extensions planned for certification though.

Erik Wetterberg

0 Likes
Version history
Last update:
‎2016-09-22 06:51 AM
Updated by: