Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Simple help with exclude expression

Hello, I have straight table in my front end page.

In data there is column "KodTowaruID", like numeric Code column, and I want to exclude few positions from my table.
example
If KodTowaruID = 1122 then exclude from table

How to write expression to do that and paste it in this place?

2019-05-14_09h38_52.png

I thought about simple

If((KodTowaruID)={1122} or {1123} or {1124} exclude from table

But could You write to me, how to make this expression to be correct?

Labels (3)
2 Solutions

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Simple help with exclude expression

You could use the following expression as calculated dimension (not in your highlighted condition which is only for displaying the entire column or hiding them):

If( not match(KodTowaruID, 1122, 1123, 1124), KodTowaruID)

- Marcus

View solution in original post

Highlighted
MVP
MVP

Re: Simple help with exclude expression

Try putting the values within single quotes like:


If(not Match(KodTowaruID, '_590', '_59027', ....

View solution in original post

5 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Simple help with exclude expression

You could use the following expression as calculated dimension (not in your highlighted condition which is only for displaying the entire column or hiding them):

If( not match(KodTowaruID, 1122, 1123, 1124), KodTowaruID)

- Marcus

View solution in original post

Highlighted
Creator
Creator

Re: Simple help with exclude expression

So I have made like U said and it is not working properly.

2019-05-14_14h16_01.png

 Do You know why?  I have write it exactly like You did.
In Dimentons tab i add calculated dimension.

Highlighted
MVP
MVP

Re: Simple help with exclude expression

Try putting the values within single quotes like:


If(not Match(KodTowaruID, '_590', '_59027', ....

View solution in original post

Highlighted
Contributor III
Contributor III

Re: Simple help with exclude expression

While calculated dimensions are useful, I tend to stay in the habit of using set expressions for whatever I am calculating in the expressions tab.  So for a Sum() expression:

Sum(  {$<KodTowaruID-={1111,1112,1113,1114}>} Field)

Notice the "-" in front of the "=" signifying to exclude the following set of values.  Simple as copying and pasting that in any aggregate function you are using.  You could also store it in a variable using the "Variable Overview" in settings menu, and then call that to use that set.  If you were to put{$<KodTowaruID-={1111,1112,1113,1114}>} as vSet1, you could write the above as.

Sum( $(vSet1) Field) or Count( $(vSet1) EmployeeID) or whatever aggregate expression you need to use.

That being said, the earlier suggestion in the calculated dimension should work as well with the single quotes (apparently Qlik doesn't like the "_" and thinks you are entering field names).  

Highlighted
Creator
Creator

Re: Simple help with exclude expression

Thank You @Jagsfan82 for your suggestion, I will try to practise this 🙂
Also thank You @marcus_sommer for respond and ofc @tresesco  for really helpful correction 🙂