Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have data something like this
and want to filter it in such a way that i need to get all records that contain either a or b in col1 and col2. Resulting in
can you let me know how do i add a filter to do the above.
Thank you,
Sai.
if you can add a measure, add in the set analysis: {<col1={'a','b'}>+<col2={'a','b'}>}
which means include rows where col1 is ab or col2 is ab
edited - added closing brackets
@gowtham2074 Please use the below Script in the back end. Also I have attached the output screen shot.
NoConcatenate
Temp:
Load * Inline [
Col1, Col2
a,b
c,c
d,b
];
NoConcatenate
Temp1:
Load *
Resident Temp
where Match(Col1,'a','b') or Match(Col2,'a','b');
Drop table Temp;
Exit Script;
If this resolves your issue, please like and accept it as a solution.
Test:
Load * inline
[
Col1,Col2
a,b
c,c
d,b
]
where Col1 = 'a' or Col1 = 'b' or Col2 = 'a' or Col2 = 'b'
;
Exit Script;
Hi Similar,
To the above I would flag it in script if possible.
Something like
Load
Col1,
Col2,
IF( Col1 = 'a' or Col1 = 'b' or Col2 = 'a' or Col2 = 'b', 1,0) as Flag
From Table;