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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
THENNA_41
Post Partisan
Post Partisan

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
Super User
Super User

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
THENNA_41
Post Partisan
Post Partisan

@amitchandak  let me check  above method and   update sir 

Hi, @THENNA_41 

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
Super User
Super User

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

@THENNA_41 , 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/193...

 

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) ) )

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors