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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
chydewf1
Frequent Visitor

Filtering row based on format

Hi,

 

I have a list of part numbers where i want to filter anything out that is not in a particular format.

 

The format I want to keep is:

 

XX-#####-X-###

 

Where x = any letter of the alphabet

and # = any number

 

The sort of thing i want to filter out is:

 

SKF 618/7

166933

HK0808

etc

 

Do you think this is possible?

 

Thanks

 

Chris

 

1 ACCEPTED SOLUTION

Hi @v-huizhn-msft

 

I think I have solved it - The following seems to work well

 

= if(mid(Table[Column],11,1)="-"&& mid(Table[Column],9,1)="-"&& mid(Table[Column],3,1)="-",TRUE,FALSE)

 

Thanks for your help

 

Chris

View solution in original post

3 REPLIES 3
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @chydewf1,

Please create a column to get ture if text column CONTAINS specified value "-" using search and text.contains in this thread.

I test it using the sample table and create a calculated column through search function.

sign =
IF ( IFERROR ( SEARCH ( "-", Test[Value] ), -1 ) > 0, TRUE (), FALSE () )


1.PNG

Then you can use the [sign] column to create a new table, slicer or other filters(page/report level filter) to filter your table rows.

Thanks,
Angelia

Hi @v-huizhn-msft

 

Thanks for your reply.

 

It almost works but does not filter this sort of thing:

 0.8X-V175

 

Ideally I would say if the 3rd, 9th and 11th characters are "-" then return TRUE

 

Is there any way I can achieve this?

 

Thanks

 

Chris

 

Hi @v-huizhn-msft

 

I think I have solved it - The following seems to work well

 

= if(mid(Table[Column],11,1)="-"&& mid(Table[Column],9,1)="-"&& mid(Table[Column],3,1)="-",TRUE,FALSE)

 

Thanks for your help

 

Chris

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.