Forum Discussion
Search text for keywords from another, separate table (Search through tags)
- Anonymous7 years ago
Hi again,
The problem is that second filter is returning many rows instead of just TRUE / FALSE, hence in order to get either true or false you can do (there might be a better solution out there)
NrRows = COUNTROWS( FILTER( TableA; COUNTROWS( FILTER( SUMMARIZE( VALUES(TableB[Keyword]); TableB[Keyword]; "result"; PATHCONTAINS(TableA[Text Column]; TableB[Keyword]) ); [result] ) > 0 ) )
I have solved this by using the Path functions.
1. I replace the "; " with "|" in the Text Column, you can either do that in the Query editor or add new calculated column.
2. Then I add a measure, e.g. count the rows that contain this value:
NrRows =
COUNTROWS(
FILTER(
TableA;
FILTER(
VALUES(TableB[Keyword]);
PATHCONTAINS(TableA[Text Column], TableB[Keyword])
)
)Hope that this works, and helps with what you are trying to achive.
Regards,
Kristjan76
Hi Kristjan,
thanks for your reply!
Although the adapted measure does not result in an error when saved, it does result in an error when trying to display the visual:
"Calculation error in measure 'measure name': A table of multiple values was supplied where a single value was expected"
Do you know which field this could be refering to?
Thanks,
Stefan