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
Mobartle
Helper I
Helper I

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?

@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
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.