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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Extract text from one column into another

Hello All - 

 

I am currently working with some Google Analytics data and attempting to extract out a specific piece of text from the URL column into another column.  

The urls are typically formatted as: 

website.com/ua/acct_pr/acs/cs_us_en/bulletins/ubs.htm?Product=acs&FirmID=324270&mybanner=1

I would like to specifically pull out the number after the FirmID=.

The tricky part is, it doesn't occur at the same spot in the string in order to count characters.  I tried to split the column with the & as the delimiter, but no such luck as it occurs in some of the rows for various reasons.

I am not the most seasoned programmer by any means, so any help would be greatly appreciated.

1 ACCEPTED SOLUTION
ankitpatira
Community Champion
Community Champion

@Anonymous If number after FirmID= is always going to be of six characters then below will do the trick. Under modelling tab create new calculated column as below.

 

NewColumn = MID(TABLE[URLColumn], FIND("FirmID=", TABLE[URLColumn] ) + 7, 6)

View solution in original post

1 REPLY 1
ankitpatira
Community Champion
Community Champion

@Anonymous If number after FirmID= is always going to be of six characters then below will do the trick. Under modelling tab create new calculated column as below.

 

NewColumn = MID(TABLE[URLColumn], FIND("FirmID=", TABLE[URLColumn] ) + 7, 6)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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