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! Learn more

Reply
Gully
Frequent Visitor

Excluding bad data from a new column

Hi,

I have a column of sharepoint data in PowerBI containing page titles. However, some rows have junk in it e.g. 90ArFg1d.

How do I create a new column without the junk (in bold) in it ?

For example:.

ColumnA

10 Tips for Web hosting

Who's Who

Complaints Procedures

90ArFg1d

Transport Department

15HTy6Gh

Commercial Department

 

I can only think of having an If statement which tests ColumnA for values of  8 characters long and starting with a number. However, I am struggling to write that as I am new to PowerBI.

Is there a better solution ?

 

Any advice would be appreciated. 

 

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

If following your rules, in Power Query, try the following: 
= Table.SelectRows(#"Filtered Rows", each not (Value.Is(Value.FromText(Text.Start([Column1], 2)), type number) and Text.Length([Column1]) = 8))

vicky__1-1682031309744.png

 

However, if possible, I would suggest trying to clean the data somehow before it gets to you like this. I imagine that there might be some cases that aren't junk, but will get caught in the above conditions.

View solution in original post

1 REPLY 1
vicky_
Super User
Super User

If following your rules, in Power Query, try the following: 
= Table.SelectRows(#"Filtered Rows", each not (Value.Is(Value.FromText(Text.Start([Column1], 2)), type number) and Text.Length([Column1]) = 8))

vicky__1-1682031309744.png

 

However, if possible, I would suggest trying to clean the data somehow before it gets to you like this. I imagine that there might be some cases that aren't junk, but will get caught in the above conditions.

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.

Top Solution Authors