Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

homersimpson
Contributor II

How can i change a dimension in a chart by click on a field?

2016-01-21_20h14_10.jpg

Regards,

Fritz

1 Solution

Accepted Solutions
ogster1974
Honored Contributor II

Re: How can i change a dimension in a chart by click on a field?

‌An example of doing this using a variable set by a button using qsvariabkele extension is here.

Makes Sense to go round in circles

10 Replies
reddys310
Honored Contributor II

Re: How can i change a dimension in a chart by click on a field?

Hi Fritz,

Yes you can can change dimension of a visualisation on selecting a value in a field.

Island:

load * inline [

Values

Year

Quarter

Month

Week

];

Create a bar chart with 1 dimension and 1 measure

dimension: pick(match(GetCurrentSelections([Values]),'Year','Quarter','Month','Week'),<YearDim>,<QuarterDim>,<MonthDim>,<WeekDim>)

This will pick a dimension based on the selection of the field Value

Measure: sum(Sales) - > example

This will help you change the dimensions on selecting a value from the field 'Value'

Thanks and Regards,

Sangram.

nareshguntur
Valued Contributor

Re: How can i change a dimension in a chart by click on a field?

Hi Fritz,

The image is not clear for me.

Assume you have two fields A & B that should change based on selection.

You assign values A & B into another field F using inline load.

Then you assign the field F into a variable and that variable can be used as Dimension.

Cheers,

Naresh

ogster1974
Honored Contributor II

Re: How can i change a dimension in a chart by click on a field?

‌An example of doing this using a variable set by a button using qsvariabkele extension is here.

Makes Sense to go round in circles

homersimpson
Contributor II

Re: How can i change a dimension in a chart by click on a field?

Hi Andy,

it works perfect, thank you and the others :-)

Regards,

Fritz

homersimpson
Contributor II

Re: How can i change a dimension in a chart by click on a field?

Hi Andy,

is this possible for measure´s?

Regards,

Fritz

ogster1974
Honored Contributor II

Re: How can i change a dimension in a chart by click on a field?

No problem glad I could help.

ogster1974
Honored Contributor II

Re: How can i change a dimension in a chart by click on a field?

In principle yes.  you could use a similar method the change the method from Sales to Qty for example using another variable.  I've not been able to so far as the measure values always total I think due to the fact the dimension is being set dynamically.

ogster1974
Honored Contributor II

Re: How can i change a dimension in a chart by click on a field?

Here it is with dynamic measure.  you just need to hide the labels as cannot be set dynamically.

homersimpson
Contributor II

Re: How can i change a dimension in a chart by click on a field?

Thank you very much!

I need a function, where can i show and hide the graphs in a chart by clicks on a button.

For example i make a field with two buttons.

1. "Button Count"

2. "Button Sum"

If i activate the button "Button Count" the blue line should showing in the chart.

If i activate the button "Button Sum" the red line should showing in the chart, too.

If i deactivate the button "Button Count" the blue line don´t should showing in the chart, but the red line (because "Button Sum" is always activated.

etc.

How can i do this?

2016-01-21_20h22_38.jpg

Regards,

Fritz

Community Browser