Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shamitshah
Partner - Creator
Partner - Creator

Exclude certain values from a dimension's field

Hi,

I have the following values in a Dimension called Category:

A

B

C

D

I want to exclude A and B. I tried the expression if(Category<>'A' and 'B',Category) and it did not seem to work.

Any ideas?

Thanks

Shamit

1 Solution

Accepted Solutions
sunny_talwar

Try this:

If(not Match(Category, 'A', 'B'), Category)

and remember to 'Suppress When Value Is Null' on the dimensions tab

View solution in original post

6 Replies
sunny_talwar

Try this:

If(not Match(Category, 'A', 'B'), Category)

and remember to 'Suppress When Value Is Null' on the dimensions tab

shamitshah
Partner - Creator
Partner - Creator
Author

Hi Sunny,

Thanks for the above. It works.

Where do you 'Suppress When Value Is Null' on the dimensions tab in QlikSense?

Thanks

Shamit

sunny_talwar

You need to uncheck this -> Show Null value for your dimension

Capture.PNG

shamitshah
Partner - Creator
Partner - Creator
Author

Thanks Sunny!

sunny_talwar

Not a problem my friend

wttaryde
Contributor III
Contributor III

Hi Sunny,

I am able to use the expression to control my dimension if I know what I want to exclude.  I would like to put modify the expression to exclude values based upon a filtered group.  My Measure expression ignores filters, so I need this to be in the dimension.  Using this example:    If(not Match(Category, 'A', 'B'), Category)

I'd like to change      (Category, 'A', 'B')    to  (Category,GetFieldSelections(Category))   or Category,GetCurrentSelections(Category))

or something like that but haven't found an expression that works.