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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Justas4478
Post Prodigy
Post Prodigy

Extracting date from source source.name text

Hello, I have folder with multiple files.

Justas4478_0-1712668369565.png 

names are consistent and numbers represent week ending date. For example 240324 is 24/03/2024.

I was trying to extract date since I need to keep only latest file from the list.
For from this list latest file is 'REPORT spsf We-240324.xlsx' , if possible I would like it to always choose latest file available since list would be getting updated weekly.

If it is not possible then to allow files in certain date range. For example files from 01/04/2024 - 31/03/2025

Anyone know how I could do that?

Thanks

 

1 ACCEPTED SOLUTION
tharunkumarRTK
Super User
Super User

@Justas4478 

You can use the below code and create a custom column. (Paste the below code in custom column window and replace the [Data] with your column name.

#date(Number.From("20" & Text.Range(Text.BetweenDelimiters([Data], "-","."),4,2) ), Number.From(Text.Range(Text.BetweenDelimiters([Data], "-","."),2,2)) ,Number.From(Text.Range(Text.BetweenDelimiters([Data], "-","."),0,2)))

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

View solution in original post

2 REPLIES 2
tharunkumarRTK
Super User
Super User

@Justas4478 

You can use the below code and create a custom column. (Paste the below code in custom column window and replace the [Data] with your column name.

#date(Number.From("20" & Text.Range(Text.BetweenDelimiters([Data], "-","."),4,2) ), Number.From(Text.Range(Text.BetweenDelimiters([Data], "-","."),2,2)) ,Number.From(Text.Range(Text.BetweenDelimiters([Data], "-","."),0,2)))

 


If the post helps please give a thumbs up


If it solves your issue, please accept it as the solution to help the other members find it more quickly.


Tharun

 

@tharunkumarRTK It is working thank you.

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.