Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

reivax31
Contributor III

Problem with filter and dimension includinf "if"

Hi Qlikers,

I have created a chart that has a dimension like:

if(vDim='1','Country', if(vDim='2','city'))

vDim is set using the extension 'Variable' that allow me to switch in my chart between Country and City.

The problem comes when I select directly on my chart a specific Country. In the filter bar the country will be selected but also the Cities ! But I don't want to have an active filter on the dimension 'City'.

This is especially problematic when vDim can have 10 different values. I will have 10 filters set a the same time when I Qlik on my chart.

Any idea about how to force Qlik to filter only on the selected dimension?

Thanks

1 Solution

Accepted Solutions
shraddha_g
Honored Contributor III

Re: Problem with filter and dimension includinf "if"

have you tried this extension Qlik Branch .

Create a variable vDimension with dimension values and use render as Button option in qliksense.

In Pie chart dimension use the variable as $(vDimension).

In variable overview set default value for vDimension.

I hope it is helpful.

8 Replies
shraddha_g
Honored Contributor III

Re: Problem with filter and dimension includinf "if"

If your data is associated then the filter will get affected on selection.

reivax31
Contributor III

Re: Problem with filter and dimension includinf "if"

So is there a way to create for exemple a donuts that can have multiples dimensions and use the variable extension to select the desired dimension?

This can be very helpfull and will avoid creating 10 donuts to show all my dimensions. The option "Alternative dimension" is not made to make it easy for the user to change dimension.

lakshmikandh
Valued Contributor II

Re: Problem with filter and dimension includinf "if"

Did you try using Alternate Dimension option ?

shraddha_g
Honored Contributor III

Re: Problem with filter and dimension includinf "if"

have you tried this extension Qlik Branch .

Create a variable vDimension with dimension values and use render as Button option in qliksense.

In Pie chart dimension use the variable as $(vDimension).

In variable overview set default value for vDimension.

I hope it is helpful.

reivax31
Contributor III

Re: Problem with filter and dimension includinf "if"

Thanks it worked great. Instead of puting if(vDim='Country', etc....) the use of $(vDim) has solved my problem

shraddha_g
Honored Contributor III

Re: Problem with filter and dimension includinf "if"

Great.

reivax31
Contributor III

Re: Problem with filter and dimension includinf "if"

Sorry,  I noticed one problem for dimensions with a space bar.

So it worked for 'country' and 'city' but not for 'City center'. I renamed my dimension to 'CityCenter' and it worked. But I will not be able to change all dimensions names. So is there a specific syntax to be used for dimension with a space bar ?

Thanks for your help

reivax31
Contributor III

Re: Problem with filter and dimension includinf "if"

Sorry I found the way. I have to put '[City Center]'

Community Browser