14 Replies Latest reply: Sep 14, 2017 9:27 AM by qlik tech

# Filter on a table

Hi

How do we filter on a dimension in a table, do we add a calculated dimension?

I have added a conditional dimension - Flag = 'Y' and the field Flag is displayed in the table as -1.

Is this the right way to filter the dimensional data in a table?

• ###### Re: Filter on a table

You can use calculated dimension, but you can also use set analysis... I am not sure what your condition is... but it could be like this

Sum({<Flag = {'Y'}>}Measure)

• ###### Re: Filter on a table

I have lot of measures in the table, I know we can use the above, but is there a way to use a dimesion as a filter?

• ###### Re: Filter on a table

May be this

If(Flag = 'Y', Dimension)

and then check 'Suppress When Value Is Null' on the dimensions tab

• ###### Re: Filter on a table

You can use this as well as calculated dimension

If(Match( Flag ,'Y' ) = 1, Dimension)

But Suppress when value null to be slected

• ###### Re: Filter on a table

If you have lot of measures then you need to give some time and add the set analysis Flag in all the measures (as set analysis is always better). Calculated dimension is the option but it is not advisable as it impacts on performance.

or another option is to provide the filter from which user can select the value 'Y'

• ###### Re: Filter on a table

Calculated dimension should be Match(Flag, 'Y') an suppress null dimension level or use set analysis

Sum({<Flag = {'Y'} >} Sales)

• ###### Re: Filter on a table

WHen I do a Match, it adds a column and displays 1 and 0, 1 for a match.

How do I remove this column, is there a way to hide it?

Are there no options in Qlik to set filter to a table without displaying it?

• ###### Re: Filter on a table

As i suggest, Your expression needed this?

If(Match(Flag, 'Y'), Flag) and suppress from dimension level. I tested and it's working

• ###### Re: Filter on a table

Thank you Anil, it works. when used with IF

To my second question, is there no way we can add a filter to the table without displaying it? I can add a comment to the table header saying what filter I have applied.

• ###### Re: Filter on a table

Already Sunny suggested this earlier.. And, for your second question also answered by anand. Would you like to know anything from this related thread? If not, Please go and close the thread and mark it as some helpful for there time...

• ###### Re: Filter on a table

You can hide it by chart properties.

• ###### Re: Filter on a table

Oh yea, thanks Anand.