Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Alternative Dimensions Button

Hi all,

I'd like to create a button menu that allows the user to choose the "alternative dimension" to show in a chart.

I know that there is the possibility to add alternative dimensions directly in the properties of the chart, but I'd like to create an alternative way to select those dimensions.

So, I have 3 dimensions (Dimension1, Dimension2 and Dimension3) and one misure.

I'd like to calculate the misure on the only one dimension selected by the user.

I have created a variable called "var1" with 3 values : "dim1", "dim2" and "dim3".

I have created 3 botton too, and I have associated the value to them.

So:

Botton1 set var1 with the value "dim1",

Botton2 set var2 with the value "dim2",

Botton3 set var3 with the value "dim3".

At least, in the chart field expression editor i have written this expression:

if(var1=dim1', Dimension1,

  if(var1='dim2', Dimension2,

    if(var1='dim3', Dimension3

        )

    )

)

In this way, I have a chart and 3 bottons that allow to the user to select the alternative dimensions.

The problem is that it doesn't work, and I don't understand why.

I think the problem is in the expression, but I no have idea how to write the expression.

Can someone help me?

3 Replies
rittermd
Honored Contributor

Re: Alternative Dimensions Button

Don't know if this will get you to what you want.

There is an extension called bi-era.com_listbox you can download from Qlik Branch.

This will allow you to create a list box with many variations.  So you could have your 3 choices defined here.

Then in your chart or table code you Dimension to be $(='[' & only(Dim1) & ']')

In my script I have loaded an inline table with the values from the listbox and the appropriate value from the actual table to load the data based on that dimension.

Dimensions:

Load * Inline [

Display,Dim1

'By Facility','Facility'

'By District','District'

'By Region','Region'

];

Hopefully that will get you in the right direction

Not applicable

Re: Alternative Dimensions Button

Thank you Mark.

I tried to download the extension but the download link doesn't work.

Can you send me the .zip file of that extension or post here the correct link, please?

Highlighted
shraddha_g
Honored Contributor III

Re: Alternative Dimensions Button

there is extension call qsVariable for Qliksense.

Qlik Branch

You can use variable to change dimension on click.

Community Browser