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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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