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! Request now

Reply
WJ876400
Helper IV
Helper IV

Split numbers from longer text

Hi

 

How do i just take out the percentage from the list below in column 1. Thanks

 

Capture.PNG

 

 

1 ACCEPTED SOLUTION

@WJ876400 ,

 

Just modify the dax above:

Column = 
VAR v_PercentPos = SEARCH( "%", 'Table'[Data], 1, 0 )
VAR _var = TRIM( RIGHT( LEFT( 'Table'[Data], v_PercentPos ), 3 ) )
RETURN
IF(_var = "00%", "100%", _var)

Or another way is to use python script:

# 'dataset' holds the input data for this script

import pandas as pd

dataset['Result'] = dataset['Data'].str.extract('\s(100%|(\d{1,2}(\.\d+)*)%)')[0]

Capture.PNG 

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @WJ876400 ,

Try this:

Column = 
VAR v_PercentPos = SEARCH( "%", 'Table'[Field], 1, 0 )
RETURN
TRIM( RIGHT( LEFT( 'Table'[Field], v_PercentPos ), 4 ) )

result.PNG

Thanks.

Please accept this as a solution if it satisfies the requirement. Appreciate your Kudos. 🙂

Hi @Anonymous 

 

Thanks that worked apart from two rows i have ended up with an e and an m infront of the number

 

Capture1.PNGCapture2.PNG

@WJ876400 ,

 

Just modify the dax above:

Column = 
VAR v_PercentPos = SEARCH( "%", 'Table'[Data], 1, 0 )
VAR _var = TRIM( RIGHT( LEFT( 'Table'[Data], v_PercentPos ), 3 ) )
RETURN
IF(_var = "00%", "100%", _var)

Or another way is to use python script:

# 'dataset' holds the input data for this script

import pandas as pd

dataset['Result'] = dataset['Data'].str.extract('\s(100%|(\d{1,2}(\.\d+)*)%)')[0]

Capture.PNG 

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous  @v-yuta-msft  thanks for your help

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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
Top Kudoed Authors