Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
rahulbb99
Contributor
Contributor

Apply filter in string to get all possible matches with relevant records

I want to apply filter in straight table on field which contain multiple values. eg. Section (3.2.S.2 3.2.S.4 3.2.S.5 3.2.R - values separated by spaces) and filter contains single value (e.g. 3.2.S.2). I have joined these table using [Section Id].

Attached sample test data.

I have implemented same using, Its working fine, but its affecting other filters (e.g Country), filters not getting applied on table.

Variable: 

vTest ='"*'& replace(concat(Distinct Field_2,','),',','*"'&','&'"*') &'*"'

Expression in Table:

=count({1<[CTD Section]={$(=$(vTest))}>}1)

Section Id Section (as filter)
1 3.2.P.5
2 2.1.A.2
3 2.1.S.2
4 2.1.S.3
5 2.1.S.4
6 3.2.S.4
7 2.1.S.7
8

3.2.P.8

 

id Country Section Section Id
287 US 3.2.P.2 1
327 UK 3.2.P.2 2
402 UK 3.2.P.2 3
547 IND 3.2.P.2 4
557 US 3.2.P.2 5
632 US 3.2.P.2 6
694 IND 3.2.P.2 7
789 UK 3.2.P.2 8
848 US 3.2.P.2 1
889 IND 3.2.P.2 2
896 US 3.2.P.2 3
1007 US 3.2.P.2 4
1042 IND 2.1.P.2 2.1.P.8 5
1078 IND 2.1.P.5 2.1.P.8 6
1110 UK 3.2.P.2 7
1203 UK 3.2.P.2 8
1418 US 3.2.P.2 1
1419 UK 3.2.P.2 3.2.P.8 2
1464 UK 3.2.P.2 3
1570 IND 3.2.P.2 4
1670 US 3.2.P.2 5
1803 UK 3.2.P.2 6
1879 IND 3.2.P.2 7
1887 UK 3.2.P.2 8
2375 US 2.1.P.5 2.1.P.8 2.1.S.4 2.1.S.7 1
2894 US 2.1.P.3 2.1.P.2 2.1.P.5 2.1.P.8 2.1.S.2 2.1.S.4 2
3536 US 3.2.P.2 3
3560 US 3.2.P.2 4
3597 UK 3.2.P.2 5
3624 UK 3.2.P.2 6
3806 US 3.2.P.1 3.2.P.4 3.2.P.3 3.2.P.8 3.2.S.5 7
3811 IND 3.2.P.1 3.2.P.5 8
4086 UK 2.1.A.2 2.1.S.2 1
4195 IND 2.1.P.3 2.1.S.3 2
4203 UK 2.1.P.8 2.1.S.1 2.1.S.4 3
4235 US 2.1.P.5 2.1.P.8 4
4540 IND 3.2.P.2 5
4592 US 3.2.P.2 6
4618 IND 3.2.P.2 7
4655 US 3.2.P.2 3.2.P.8 8
4744 IND 2.1.A.2 2.1.S.2 1
5142 UK 3.2.P.2 2
5189 US 3.2.P.2 3
5742 UK 3.2.P.2 4
5847 UK 3.2.P.1 3.2.P.4 3.2.P.5 5
6138 UK 3.2.P.2 6
7206 UK 2.1.P.3 2.1.P.5 2.1.P.8 7
7311 UK 3.2.P.2 8
7558 IND 3.2.P.1 3.2.P.5 1
7596 UK 3.2.P.2 2
7614 UK 3.2.P.2 3
7632 UK 2.1.P.3 2.1.P.7 4
7667 US 3.2.P.2 5
7679 US 3.2.P.2 6
7936 IND 3.2.P.1 3.2.P.7 7
8251 IND 3.2.P.2 8
8275 IND 3.2.P.2 1
8327 US 3.2.P.2 2
8662 IND 3.2.P.2 3
8663 US 3.2.P.2 3.2.P.1 3.2.P.3 3.2.P.5 3.2.P.6 3.2.P.7 3.2.P.8 4
8674 IND 3.2.P.2 5
8705 US 3.2.P.2 6
8849 US 2.1.S.1 2.1.S.4 2.1.S.2 2.1.S.5 2.1.S.3 2.1.S.7 2.1.S.6 2.1.P.5 2.1.P.8 7

 

In sandbox:  I want to filter matching fields (matching field with rest of string)  which contain filter value in straight table.

Result:

id Country Section Section Id
4086 UK 2.1.A.2 2.1.S.2 1

 

Thanks in Advance.

 

0 Replies