Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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?
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
Try putting the values within single quotes like:
If(not Match(KodTowaruID, '_590', '_59027', ....
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
So I have made like U said and it is not working properly.
Do You know why? I have write it exactly like You did.
In Dimentons tab i add calculated dimension.
Try putting the values within single quotes like:
If(not Match(KodTowaruID, '_590', '_59027', ....
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).
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 🙂