Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Highlighted
Stefan_dT
New Contributor II

Filtering on a dimension from a PICK list, filters on all, instead of just the returned dimension

Good day

I have a dynamic dimension I use in a bar graph, based on the value of a variable.  This variable gets set by the end-user's choice of KPI to focus on.  It is used to change colour schemes, show/hide measures in tables etc...  All works fine.

However when I click on a bar in the bar graph using this dynamic dimension (see code below), it doesn't just filter on the "active" dimension, but on all.  

 

 

=PICK(MATCH('$(vKPI)'  ,'Sites','Revenue','ARPS','Data','Voice','MSI','nNPS','Quality'), 
                        [Max Tech Data Utilisation % Bracket]
                       ,[Revenue Growth % Bracket]
                       ,[Revenue Growth % Bracket]
                       ,[Data Traffic Growth % Bracket]
                       ,[Voice Traffic Growth % Bracket]     
                       ,[MSI % Bracket]           
                       ,[nNPS Bracket]            
                       ,[Quality % Bracket])
                       

 

 

 

So for example, if the vKPI variable = 'Revenue', the dimension returned would be [Revenue Growth % Bracket].  If I click on a bar, eg the "1 - 10%" bracket, my dataset gets filtered on all 8 bracket dimensions:

1.Filter.PNGFiltering2.Selections.PNGThe result in the selections bar

 

How can I limit the filter action to only filter on the selected dimension from the pick list?

Labels (3)
3 Replies
Partner
Partner

Re: Filtering on a dimension from a PICK list, filters on all, instead of just the returned dimensio

Hi!

Just put it inside another dollar sign like:

=$(=PICK(MATCH('$(vKPI)'  ,'Sites','Revenue','ARPS','Data','Voice','MSI','nNPS','Quality'), 
                        [Max Tech Data Utilisation % Bracket]
                       ,[Revenue Growth % Bracket]
                       ,[Revenue Growth % Bracket]
                       ,[Data Traffic Growth % Bracket]
                       ,[Voice Traffic Growth % Bracket]     
                       ,[MSI % Bracket]           
                       ,[nNPS Bracket]            
                       ,[Quality % Bracket]))

 Not shure you need second =, but try. It will calculate required fiel name inside $() dollar and inser single name inside calculated dimension.

Stefan_dT
New Contributor II

Re: Filtering on a dimension from a PICK list, filters on all, instead of just the returned dimensio

Thanks Simon, but Qlik don't seem to like this syntax.  Without the 2nd "=" it gives me an "Invalid Dimension" and with it, it only returns nulls.

Stefan_dT
New Contributor II

Re: Filtering on a dimension from a PICK list, filters on all, instead of just the returned dimensio

Managed to get the format sorted of putting it inside a $:

={'$(=PICK(MATCH(''$(vKPI)''   ,''Sites'',''Revenue'',''ARPS'',''Data'',''Voice'',''MSI'',''nNPS'',''Quality''), 
                         [Max Tech Data Utilisation % Bracket]
                        ,[Revenue Growth % Bracket]
                        ,[Revenue Growth % Bracket]
                        ,[Data Traffic Growth % Bracket]
                        ,[Voice Traffic Growth % Bracket]     
                        ,[MSI % Bracket]           
                        ,[nNPS Bracket]            
                        ,[Quality % Bracket]))'}

 This still gives an error msg in the expression editor, but actually worked the same as before.  Unfortunately the erroneous behavior of applying a filter on all fields remains.