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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Fahmie
Regular Visitor

How to extract info from every row based on Specific text in a column?

As per the subject above, I want to extract all the rows that meet the criteria on a certain column. For example below, I want to extract all the row when the column "STATUS" stated "OVERDUE".

 

SECTIONELEMENTTASKDUE DATESTATUSEVIDENCE

1

1ATask 131-Dec-22ONGOINGTBA
22ATASK 21-Sep-23ONGOINGTBA
33ATask 31-Dec-22ONGOINGTBA
44ATask 41-Dec-22ONGOINGTBA
55ATask 51-Jan-22OVERDUENo
55BTask 62-Jan-22OVERDUENo
66ATask 72-Feb-22CLOSEDYes

 

So on my PBI table visual it would be like this:

 

SECTIONELEMENTTASKDUE DATESTATUSEVIDENCE

5

5ATask 51-Jan-22OVERDUENo
55BTask 62-Jan-23OVERDUENo
1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Fahmie ,

1.If your expected result is the table in Power BI data view, you should do it in Power Query.

In the drop-down box of STATUS column, enter "OVERDUE" in the search box, then click "Select All Search Results"

vkalyjmsft_0-1667458245139.png

After load into Desktop, the table also only contains the expected rows.

2.If you just want to get a visual only containing the expected rows, create a measure.

Measure =
IF ( CONTAINSSTRING ( MAX ( 'Table'[STATUS] ), "OVERDUE" ), 1, 0 )

Put the measure in the visual filter and set to 1.

vkalyjmsft_1-1667458695595.png

After apply filter, get the expected result.

vkalyjmsft_2-1667458753640.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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-yanjiang-msft
Community Support
Community Support

Hi @Fahmie ,

1.If your expected result is the table in Power BI data view, you should do it in Power Query.

In the drop-down box of STATUS column, enter "OVERDUE" in the search box, then click "Select All Search Results"

vkalyjmsft_0-1667458245139.png

After load into Desktop, the table also only contains the expected rows.

2.If you just want to get a visual only containing the expected rows, create a measure.

Measure =
IF ( CONTAINSSTRING ( MAX ( 'Table'[STATUS] ), "OVERDUE" ), 1, 0 )

Put the measure in the visual filter and set to 1.

vkalyjmsft_1-1667458695595.png

After apply filter, get the expected result.

vkalyjmsft_2-1667458753640.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you so much! It's works!

So if i want to show just "ONGOING" Status, my measure shld be like this?

Measure =
IF ( CONTAINSSTRING ( MAX ( 'Table'[STATUS] ), "ONGOING" ), 2, 0 )

btw what is the meaning of 0 at the end of the measure?

Hi @Fahmie ,
Yes, it is. But if you use 2 in the formula, in the visual filter, the value should be 2.

In the IF function, 0 is the result that does not meet the if condition. The logic is we first set the correct result is 1 and the incorrect result is 0. Then if we select 1 in the visual filter, the visual will only show values are correct.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Fahmie , Add a slicer on status column that will filter the visual

 

or an alternative

Text Filter Slicer and how to search on Multiple columns: https://youtu.be/RbeZRJ3uAZE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.