cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RobX
Advocate I
Advocate I

Keyword Search

I have a table that contains a text column and a second table that contains a list of keywords.  I'm trying to set up a slicer that allows me to filter the text column by the keywords.

 

I created two measure and added a visual filter to accomplish this.  The two measures I have are:

 
SelectedKeyword =
SELECTEDVALUE(
Keywords[Keywords]
)
 
WordFilterTest =
IF (
SUMX(Keywords,
FIND(
UPPER([SelectedKeyword ]),
UPPER(MAX(Note[Note])),, 0)
) > 0, 1, 0
)

This seems to work until I try to add the actual text column ([Note]) to the table visual.  On adding the column, I end up with a time out due to memory constraints. 
 
Does anyone know an alternate way to get the keyword search working?
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@RobX , the Second one can not be a column. You can create two measures like

 

SelectedKeyword =
SELECTEDVALUE(
Keywords[Keywords]
)

WordFilterTest =

SUMX(Note,
if(Search([SelectedKeyword ],Note[Note],, 0) > 0, 1, 0)
)



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@RobX , the Second one can not be a column. You can create two measures like

 

SelectedKeyword =
SELECTEDVALUE(
Keywords[Keywords]
)

WordFilterTest =

SUMX(Note,
if(Search([SelectedKeyword ],Note[Note],, 0) > 0, 1, 0)
)



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

How are these used?  WordFilterTest added as filter greater than 0? What about the other? 

That fixed it!  Thank you!

Helpful resources

Announcements
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors