Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
gco
Resolver II
Resolver II

Slicer from a list of keywords

I have 2 tables, 1 with accountnumbers, and notes fields.  And the other table has keywords.

 

I was able to create a slicer based on Keywords, but it is not able to filter Table 1.  If I do it in SQL, it would be something like 'SELECT AccountNumbers, Notes From TableName WHERE notes like '%keywords%''.  Your help is much appreciated.

 

Thank you

Glen

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @gco 

If i understand you correctly, create measures

selected keywords = SELECTEDVALUE(table2[key words])

select rows =
IF (
    ISERROR ( FIND ( [selected keywords], MAX ( account[notes] ), 1, 0 ) ),
    0,
    FIND ( [selected keywords], MAX ( account[notes] ), 1, 0 )
)

Capture14.JPG

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @gco 

If i understand you correctly, create measures

selected keywords = SELECTEDVALUE(table2[key words])

select rows =
IF (
    ISERROR ( FIND ( [selected keywords], MAX ( account[notes] ), 1, 0 ) ),
    0,
    FIND ( [selected keywords], MAX ( account[notes] ), 1, 0 )
)

Capture14.JPG

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-juanli-msft 

You are a genius!!! Your measures worked perfectly.

 

Can i ask you one more question?  How do i now accurately show the row count for my table based on the selection?  On the filtered view, it shows the rows correctly.  But if i create a card or table that shows the count, it still shows the total number of rows without the filter applied.  And i tried applying the [select rows] filter, but it becomes readonly - so i am not able to change it to "is not 0".

 

Thank you again

Glen

I found my solutions for the row count.  I created a measure as below:

 

RowCount = CALCULATE(COUNTROWS(RELATEDTABLE(Table1)),FILTER(Table1,[Selected Rows])).

 

Thanks again @v-juanli-msft 

@v-juanli-msft the measures you gave me has been working perfectly.  But i was asked a question by my user if it is possible to select multiple keywords.  Do you know if that is possible?  I was able to change the Selected Keywords measure to CONCATENATEX ( Values (SearchStrings[SearchStringVal], [SearchStringVal], ",").  But i could not figure out how to do the Selected Row.

 

When you have time, would you mind sharing me the measure for this?

Thank you

Glen

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.