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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Filter rows starting with two numbers

Hey folks, 

 

I need to filter out the rows that start with two numbers (e.g. "15John"). Is there any way to do so in Power Query? 

 

 

1 ACCEPTED SOLUTION

@Anonymous 

Please check the attached file: https://1drv.ms/u/s!AmoScH5srsIYgYILtIDVwH_Ipqpgng?e=X8cDaq

The new column added in PQ will allow you to filter the rows where the value starts with 2 digits.

Fowmy_0-1595331391524.png

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

I accept KUDOS 🙂

YouTube, LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@Anonymous 

Add this as a new column and filter only TRUE:

= try Value.Is(Number.From(Text.Start([data],2)), type number) otherwise false



________________________

Did I answer your question? Mark this post as a solution, this will help others!.

I accept KUDOS 🙂

YouTube, LinkedIn 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Hey @Fowmy , thanks for the response. 

 

The formula doesn't really work for me.

 

I am not sure what you mean by 'type number', there is no fixed number I am looking for. It's all the rows that start with 2 numbers. (e.g. 12xx as well as 17xx) 

@Anonymous 

Please check the attached file: https://1drv.ms/u/s!AmoScH5srsIYgYILtIDVwH_Ipqpgng?e=X8cDaq

The new column added in PQ will allow you to filter the rows where the value starts with 2 digits.

Fowmy_0-1595331391524.png

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

I accept KUDOS 🙂

YouTube, LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Many thanks @Fowmy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.