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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Get Week number from Source name value using Mcode

Hi,

I hope to get week number after right-most delimiter '_' which the result will be 'W35'.

Also wanna know how I can get only number such '35' as well. 

 

jeongkim_0-1728112956890.png

 

 

3 ACCEPTED SOLUTIONS

Heyy @Anonymous 
Please try this 
Text.BeforeDelimiter( Text.AfterDelimiter([Column1], "_", 1), ".",0)

elitesmitpatel_0-1728114792819.png


If it helps please Kudos To Work and Accept it as Solution.

View solution in original post

Heyy @jeongkim 
Please try this 
Text.End( Text.BeforeDelimiter( Text.AfterDelimiter([Column1], "_", 1), ".",0),2)

elitesmitpatel_3-1728115143135.png

 

 


If it helps please Kudos To Work and Accept it as Solution.

View solution in original post

danextian
Super User
Super User

Hi @Anonymous 

 

In the GUI, go to either Transform or Add Column tab, select Extract then Between Delimiters.

danextian_0-1728138200642.png

danextian_1-1728138223518.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

5 REPLIES 5
danextian
Super User
Super User

Hi @Anonymous 

 

In the GUI, go to either Transform or Add Column tab, select Extract then Between Delimiters.

danextian_0-1728138200642.png

danextian_1-1728138223518.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
dharmendars007
Memorable Member
Memorable Member

Hello @Anonymous , 

 

Please try the below mcode to get the desired result..

 

= Text.AfterDelimiter([Source Name], "_", 1)

 

dharmendars007_0-1728113581587.png

 

If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

 

Anonymous
Not applicable

Hi, I need only W35 and 35 without '.xlsx' please

Heyy @jeongkim 
Please try this 
Text.End( Text.BeforeDelimiter( Text.AfterDelimiter([Column1], "_", 1), ".",0),2)

elitesmitpatel_3-1728115143135.png

 

 


If it helps please Kudos To Work and Accept it as Solution.

Heyy @Anonymous 
Please try this 
Text.BeforeDelimiter( Text.AfterDelimiter([Column1], "_", 1), ".",0)

elitesmitpatel_0-1728114792819.png


If it helps please Kudos To Work and Accept it as Solution.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.