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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

how to get date from excel file name

I having a excel file name   Exception 03_16_02_22_08_58_04.Xlsx .  i want to exctract date from  excel sheet to used to column in my table.

 

 My Table 

 

  Product center          QTF         Actuals 

  STF                            23            334

  GTF                            43            534

  RTF                            53            134

  HTF                            43            234

 

I want to get from date excel sheet to used column in table .

Expected output.

Actiondate         Product center          QTF         Actuals 

 2022-02-16        STF                           23           334

2022-02-16          GTF                         43            534

2022-02-16         RTF                          53            134

2022-02-16         HTF                         43            234

 

any idea. looking for support.

 

                               

                                

                                

                         

 

1 ACCEPTED SOLUTION
serpiva64
Solution Sage
Solution Sage

Hi,

instead of getting data from file you have to get data from folder then keep the column 

serpiva64_0-1645008975239.png

then add a custom column 

serpiva64_1-1645009009601.png

- expand 

serpiva64_2-1645009058824.png

and that's done

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@amitchandak  let me check  above method and   update sir 

Hi, @Anonymous 

Could you please tell me whether your problem has been solved?

If your problem has been solved, you could accept the helpful answer as solution to close this thread.

It will help other community members easily find the solution when they get the similar issue.

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

serpiva64
Solution Sage
Solution Sage

Hi,

instead of getting data from file you have to get data from folder then keep the column 

serpiva64_0-1645008975239.png

then add a custom column 

serpiva64_1-1645009009601.png

- expand 

serpiva64_2-1645009058824.png

and that's done

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

 

amitchandak
Super User
Super User

@Anonymous , first try to get file name in power query

https://community.powerbi.com/t5/Desktop/Extract-Excel-workbook-filename/td-p/991423

https://trumpexcel.com/list-file-names-power-query/

https://community.powerbi.com/t5/Power-Query/Get-current-file-name-within-PowerQuery-Editor/td-p/1933289

 

then have new column in power query like

#date(Number.FromText(Text.Middle([Filename],9,2) ) , Number.FromText(Text.Middle([Filename],6,2) ), Number.FromText(Text.Middle([Filename],3,2) ) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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