Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How do i check if a value from 1 field is in another?
ID,Name,Name2
1,john,james
2,james,paul
3,mark,sue
So only show the rows where theres a match of The value in Name2 and Name and then flag both rows, id 1 and 2 not 3.
Thanks
try this, result in Match field
Test:
LOAD * INLINE [
ID,Name,Name2
1,john,james
2,james,paul
3,mark,sue
];
LEFT JOIN (Test)
LOAD DISTINCT
Name2 as Name,
1 as NameMatchName2
Resident Test;
LEFT JOIN (Test)
LOAD DISTINCT
Name as Name2,
1 as Name2MatchName
Resident Test;
LEFT JOIN (Test)
LOAD
ID,
IF(NameMatchName2 OR Name2MatchName, 1, 0) as Match
RESIDENT Test;
Thanks,
What i'm trying to do is the following as the final outcome.
Hi,
How do i check if a value from 1 field is in another?
ID,Name,Name2
1,john,james
2,james,paul
3,mark,sue
So only show the rows where theres a match of The value in Name2 and Name and then flag both rows, id 1 and 2 not 3.
Thanks for your help
Test:
LOAD * INLINE [
ID,Name,Name2
1,john,james
2,james,paul
3,mark,sue
];
LEFT JOIN (Test)
LOAD DISTINCT
Name2 as Name,
1 as NameMatchName2
Resident Test;
LEFT JOIN (Test)
LOAD DISTINCT
Name as Name2,
1 as Name2MatchName
Resident Test;
LEFT JOIN (Test)
LOAD
ID,
IF(NameMatchName2 OR Name2MatchName, 1, 0) as Match
RESIDENT Test;
In a chart you can show the rows with a match
dimensions ID, Name, Name2
measure Max(Match)
and exclude the zero values