Forum Discussion
How to derive Date from Date Title
Hi all,
I have a client with many Excel workbooks with the title as the week ending date, e.g. we 14-11-2021.
Inside the workbook are spreadsheets that list the days of the week, as shown below.
Is there any way to derive the Date of the spreadsheet (days) in Power Query? Or if I am restricted to DAX where can I start?
Hi Anonymous ,
You can use the Table.ColumnNames function to derive the column title.
For example this sample.
You can right click the query field to create a blank query
Then put the below code in the advanced editor.
let Source = Table.ColumnNames(#"Table") in SourceGet a new list query presenting the column title.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-yanjiang-msft
Community Support
Hi Anonymous ,
You can use the Table.ColumnNames function to derive the column title.
For example this sample.
You can right click the query field to create a blank query
Then put the below code in the advanced editor.
let Source = Table.ColumnNames(#"Table") in SourceGet a new list query presenting the column title.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.