Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Georgy_Paul
Contributor II
Contributor II

Is it possible to filter on multiple selections in the same filter pane using AND logic?

Hi,

I am having a field with values Seperated by pipeline.

For example

SampleValue
A|B|C1
A|B1
A|C2
B|C3
C|A|B1
A|D4
A1
C|B3
B4
D1

 

I need a multiselect dropdown with the distinct values from the column. In this case my dropdown should contain A, B, C and D.

If I select A from the dropdown then it should select the following rows

SampleValue
A|B|C1
A|B1
A|C1
C|A|B1
A|D4
A1

 

Now If I select both A and B from the dropdown Then it should select the following rows

SampleValue
A|B|C1
A|B1
C|A|B1

 

If I select A,B and C , Then I should get

SampleValue
A|B|C1
C|A|B1

 

Can somebody help me with this

Labels (1)
1 Solution

Accepted Solutions
PriyankaShivhare
Creator II
Creator II

 

 

to get the required filter do subfield on the sample

data:
Load *,
subfield(Sample,'|') as test
Inline [
Sample, Value
A|B|C, 1
A|B, 1
A|C, 2
B|C, 3
C|A|B, 1
A|D, 4
A ,1
C|B ,3
B ,4
D ,1
];

write the below expression in place of sample:

=if(getselectedcount(test)>0,if(WildMatch(Sample,'*$(=left(GetFieldSelections(test),1))*')and WildMatch(Sample,'*$(=mid(GetFieldSelections(test),4,1))*')

and WildMatch(Sample,'*$(=mid(GetFieldSelections(test),7))*')

,Sample),Sample)

 

thanks,

Priyanka

View solution in original post

1 Reply
PriyankaShivhare
Creator II
Creator II

 

 

to get the required filter do subfield on the sample

data:
Load *,
subfield(Sample,'|') as test
Inline [
Sample, Value
A|B|C, 1
A|B, 1
A|C, 2
B|C, 3
C|A|B, 1
A|D, 4
A ,1
C|B ,3
B ,4
D ,1
];

write the below expression in place of sample:

=if(getselectedcount(test)>0,if(WildMatch(Sample,'*$(=left(GetFieldSelections(test),1))*')and WildMatch(Sample,'*$(=mid(GetFieldSelections(test),4,1))*')

and WildMatch(Sample,'*$(=mid(GetFieldSelections(test),7))*')

,Sample),Sample)

 

thanks,

Priyanka