Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Set Analysis

I am using set analysi in which i need to include the string which has "1-Blcok search" but the problem is there are many places where this is in the middle and some time it is after one word
how do i deal with this kind of situation .
As shown in below "1-Blcok search" some times it is only that , and in the end  row it is in the middle and some time is in the last .

1-Blcok search
Build 1-Blcok search
Cosmatics 1-Blcok search Build


How do in include such thing in set analysis ?

Thanks in Advance

1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

maybe use the "or" operator like this:

=sum({<Name={"=Wildmatch(Name,'*1-Blcok search*')=1 or Wildmatch(Name,'*H1-Blood*')=1"}>}Data)

View solution in original post

7 Replies
Anil_Babu_Samineni

Try like

Load If(Match(FieldName, '1-Blcok search'), 1,0) as Flag From Table;

Then in analysis use an ex, Sum({<Flag={1}>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Frank_Hartmann
Master II
Master II

try like this:

=sum({<Name={"=Wildmatch(Name,'*1-Blcok search*')=1"}>}Data)

smilingjohn
Specialist
Specialist
Author

Thanks for the reply Frank.
This is working for one search , when i add many search within this is is not working


=sum({<Name={"=Wildmatch(Name,'*1-Blcok search*','*2-Cosmatics*','*H1-Blood'*)=1"}>}Data)


Do I need to make changes to set analysis ?

Thanks

Frank_Hartmann
Master II
Master II

maybe use the "or" operator like this:

=sum({<Name={"=Wildmatch(Name,'*1-Blcok search*')=1 or Wildmatch(Name,'*H1-Blood*')=1"}>}Data)

marcus_sommer

Just add and correct:

=sum({<Name={"=Wildmatch(Name,'*1-Blcok search*','*2-Cosmatics*','*H1-Blood*')>=1"}>}Data)

whereby the wildmatch isn't really needed else it should also work with:

=sum({<Name={'*1-Blcok search*','*2-Cosmatics*','*H1-Blood*'}>}Data)

- Marcus

Nagarjun_km
Contributor
Contributor

Hi John,

 

Why can't  you create flag in script level  and make it easy in expreesion level.

thank you

 

Regards,

Nagarjun

smilingjohn
Specialist
Specialist
Author

Thanks Frank

This is working , To exclude this can i use the below expression I doubt this .

sum({<Name-={"=Wildmatch(Name,'*1-Blcok search*') or Wildmatch(Name,'*H1-Blood*')=1"}>}Data)

 

Thanks