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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

Anyone know how to parse a text and store in a new column for a tabular model

Hi, I have been trying to find out the best way of parsing out the mfg lot from a group of serial numbers. Four consecutive numbers (Place values are 7-10, As shown below)

 

Mobartle_0-1628788863047.png

 

First two place are for the week and the second two the year. Can anyone show me how to accomplish this? A Dax calculation? Something? I am unable to use the serial number column inside the tabular model to execute this (=mid(Data[text],7,4)) calculated metric as only measures are available for use opposed to actual columns. Can someone provide with code or an alternative to create a calculated measure based off an actual column in a tabular model?

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

Are you trying in M Query, then it is easy,

 

Select the column you are trying to extract,

go to tab "add column", click extract dropdown, click range, enter 7 and 4.

 

sevenhills_0-1628791688310.png

 

Will this help you?

View solution in original post

2 REPLIES 2
sevenhills
Super User
Super User

Are you trying in M Query, then it is easy,

 

Select the column you are trying to extract,

go to tab "add column", click extract dropdown, click range, enter 7 and 4.

 

sevenhills_0-1628791688310.png

 

Will this help you?

Anonymous
Not applicable

@sevenhills I have been attempting to do so but the fact that it is a tabular model, that live connection show for my visuals but does not show up as table when transforming the data.

 

Mobartle_0-1629122524580.png

 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors