Forum Discussion
Cofinia
10 years agoFrequent Visitor
Retain xlsx file name in new column when using Folder as a data source
Hi, I'm using a folder to import files to PowerBI. I used the information given on this forum to solve the problem of importing xlsx files http://exceleratorbi.com.au/combine-excel-workbooks-power...
IvanBond
10 years agoAdvocate II
Hello,
when you query From Folder, you have column [Name] in query editor. Left to cut it on pieces with help of functions Text.Start, Text.End, Text.Range.
formula for "20160229.xlsx"
#date( Number.From( Text.Start( [Name], 4 ) ),
Number.From( Text.Range( [Name], 4, 2 ) ),
Number.From( Text.Range( [Name], 6, 2 ) )
)
BR,
Ivan
- Cofinia10 years agoFrequent Visitor
Hi IvanBond,
I tried your solution, but I was not able to make it work.
I selected the 8 first digits ans it worked.
Then I change the format to dates.
Thank you for your help.