Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
AH
Creator III
Creator III

How to exclude strings from the field using buttons

I want to exclude these two string values using the button. I was trying to use this expression but its not working.

"("& concat({<ServiceOrderDesc-={"SPARE PARTS ORDER","spare part needed"}>} Distinct ServiceOrderDesc, '|')& ")'

Its not working. Anyone help me please!

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

Here is the sample off my data.

If you have an app to share i can apply the same to yours.

View solution in original post

6 Replies
JonnyPoole
Employee
Employee

try this

='(' & Concat( {<ServiceOrderDesc=-{'SPARE PARTS ORDER','spare part needed'}>} distinct  '"' & ServiceOrderDesc & '"','|') & ')'

it will create values like this:

("Value1","Value2") 

..excluding the 2 you wrote out

The double quotes are used in case their are spaces or other special characters in the Values

AH
Creator III
Creator III
Author

Hey Jonathan,

I appreciate your help but its not working.

exp.PNG.png

Thanks,

Shan

JonnyPoole
Employee
Employee

Oh thats ok.  The expression editor has a bug on the highlighter when you use -= syntax in SET ANALYSIS. You'll notice it says 'ok' right above. Trying hitting OK and let me know the results.

AH
Creator III
Creator III
Author


It still doesnt work.

Thanks,

Shan

JonnyPoole
Employee
Employee

Here is the sample off my data.

If you have an app to share i can apply the same to yours.

AH
Creator III
Creator III
Author

Jonathan,

Thank you very much. Its working now.

Shan

Sorry, I was using an excel file and it was working but now i am using database and its not working now.

Thanks,

Shan