cancel
Showing results for 
Search instead for 
Did you mean: 
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
Solution Sage
Solution Sage

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
Solution Sage
Solution Sage

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors