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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Linnil
Helper III
Helper III

Separate Integer or Decimal from Text

Hi

 

I have values like this:

 

BL, JZ5, CC6.3

So Text combined with an integer or Text combined with a decimal value.

 

I would like the data to split into Col A and Col B

 

DataCol ACol B
BLBL 
JZ5JZ5
CC6.3CC6.3

 

Could anyone help with a power query solution to splilt the text from the number?
Just not having any luck with my power query trials.

 

Thanks

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Following will be a simple solution based on test cases presented by you.

For selecting Text
= Text.Select([Data], {"A".."Z","a".."z"})

For selecting Number
= Text.Select([Data], {"0".."9","."})

 

View solution in original post

4 REPLIES 4
slorin
Super User
Super User

Or split by character transition

= Table.SplitColumn(
Source,
"Data",
Splitter.SplitTextByCharacterTransition((c) => not List.Contains({"0".."9"}&{"."}, c), {"0".."9"}),
{"Col A", "Col B"})

Stéphane

Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Following will be a simple solution based on test cases presented by you.

For selecting Text
= Text.Select([Data], {"A".."Z","a".."z"})

For selecting Number
= Text.Select([Data], {"0".."9","."})

 

jmpmolegraaf
Frequent Visitor

if the first two characters are always letters followed by a number or not, then you can split the columns after the second character. "Add Column", "Extract", "Length" for example?

Sorry - I should have mentioned that the text might be 2-3-4 characters, so none of those solutions work.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.