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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Iceberg12
Frequent Visitor

Filter rows data

Hello everyone, 

I have the following table:

NameCode
Company A"1", "2", "3","4","5"
Company B"1", "2"
Company C"1", "2", "3","4","5"
Company D"1", "2", "3","4","5"
Company E"3","4","5"
Company F"4","5"


I would like to have a filter for example, on the filter, it should show only single value, e.g: 1,2,3,4,5 

And when I choose 1, it should show the data like this:

Name
Company A
Company B
Company C
Company D


When I choose 4, it should show:

Name
Company A
Company C
Company D
Company E
Company F


Thank you for your help and support 🙂

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Iceberg12 , refer this solution

 

Power BI- Text Part slicer to filter/search text - https://youtu.be/MKKWeOqFG4c
https://medium.com/@amitchandak/power-bi-search-text-parts-in-text-ad2f9783ffa2

 

Or create an independent table with values 1 to 5

 

Tab = Generateseries(1,5,1) // do not join

 

Then use that in filter and use a measure like this with company 

Countrows(filter(Table, containsstring([code], selectedvalues(Tab[Value]) )))

 

Power BI: DAX Functions: Search, Find,containsstring, containsstringexact: https://youtu.be/cN8AO3_vmlY?t=21228

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
Iceberg12
Frequent Visitor

This works perfectly, thanks much 🙂

amitchandak
Super User
Super User

@Iceberg12 , refer this solution

 

Power BI- Text Part slicer to filter/search text - https://youtu.be/MKKWeOqFG4c
https://medium.com/@amitchandak/power-bi-search-text-parts-in-text-ad2f9783ffa2

 

Or create an independent table with values 1 to 5

 

Tab = Generateseries(1,5,1) // do not join

 

Then use that in filter and use a measure like this with company 

Countrows(filter(Table, containsstring([code], selectedvalues(Tab[Value]) )))

 

Power BI: DAX Functions: Search, Find,containsstring, containsstringexact: https://youtu.be/cN8AO3_vmlY?t=21228

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.