Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change dimension based on a filter

I want to change the dimension of table based on my filter selection. Is it possible to do so in Qlik Sense?  Please guide. Thanks.

Best Regards,

29 Replies
shraddha_g
Partner - Master III
Partner - Master III

create an Inline table with having field with dimension names.

Use that as a Filter and in Dimension use if(Getselectedcount(InlineFieldName) = 1,GetfieldSelection(InlineFieldName),DefaultDimension)

Anonymous
Not applicable
Author

Sorry, I could not follow you.

I have 3 dimensions (division, region and territory), If I create a filter to select one of these dimensions, I want the table to show different measures for the selected metric.

Also, second question is how can I create such a filter? these three dimensions are 3 variables in my data. Can you please guide?

shraddha_g
Partner - Master III
Partner - Master III

Use Qlik Branch to give buttons for choosing Dimension.

Create a Variable vDim with values as division, region and territory and Labels as Division, Region, Territory respectively.

In Chart,

In Dimension, Use $(vDim) as Dimension

in Measure

Pick(wildmatch(vDim,'division','region','territory'),

Expression for division,

Expression for region,

expression for Terrirory

)

shraddha_g
Partner - Master III
Partner - Master III

In Load Script,

Load * Inline [

Dimemsion

Division

Region

Territory

];

In Front End,

Use Dimension Field from Inline table as Filter

In Chart,

In Dimension, if(getfieldselection(Dimension) = 'Division',$(division),

                              if(getfieldselection(Dimension) = 'Region',$(region),

                                          if(getfieldselection(Dimension) = 'Territory',$(territory))))

In Measure,

if(getfieldselection(Dimension) = 'Division',Expression for Division,

             if(getfieldselection(Dimension) = 'Region',Expression for Region,

                        if(getfieldselection(Dimension) = 'Territory',Expression for Territory)))

Anonymous
Not applicable
Author

Thanks a lot for your response. I am pretty new to Qlik Sense and probably will take some time to implement it. I will get back to you with an update if this solves my purpose as soon as I am done. Thanks.

Anonymous
Not applicable
Author

Can you guide me how should I write the expression for the created variable?

shraddha_g
Partner - Master III
Partner - Master III

What do you mean by created variable?

Anonymous
Not applicable
Author

You asked me to create a variable vDim with values Division, Region and territory. I am not able to understand what expression to write to get the desired result.

Anonymous
Not applicable
Author

I am not able to load the given code:

Load * Inline [

Dimemsion

Division

Region

Territory

];

I am getting the following error:

INLFED << 0435-a9d1-fc23-622c Lines fetched: 3

The following error occurred:

Unknown statement: binary

The error occurred here:

>>>>>>binary<<<<<< 'lib://gSonar DataModel (rnumdmas_qsadmin)/Model-gSonar Integrated.qvw'