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
TroyKurt
Frequent Visitor

Need to filter a column based on first character being a number or text.

Hi, I have a filed that contains part numbers. Some of the part numbers start with a letter and I would like to be able to filter out all part numbers that begin with a letter. 

 

Is it possible to right a measure to do this? I haven't had much luch.

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @TroyKurt ,

you can do it like this:

 

09-07-_2021_00-02-35.png

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @TroyKurt,

Can you please share some dummy data and expected results to test? It should help us clarify your data structures and test to coding formula.

How to Get Your Question Answered Quickly

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
FrankAT
Community Champion
Community Champion

Hi @TroyKurt ,

you can do it like this:

 

09-07-_2021_00-02-35.png

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

AlexisOlson
Super User
Super User

You can use LEFT to take the first part of a text string.

 

For example:

FILTER ( TableName, LEFT ( TableName[ColumnName], 1 ) <> "A" )

How do you make it filter all letters, not just "A"?

Another option would be to list all the letters you want to exclude:

 

FILTER ( TableName, NOT ( LEFT ( TableName[ColumnName], 1 ) IN { "A", "B", "C", ..., "Z" ) )

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.