The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi.
I have a column that lists file names (as an example '32.1Checkfile_20240302-Exceptions.xlsx').
I am trying but keep failing to extract the date from the file name (20240302) and put this into a new column in PBI and format this as a date.
Is anyone able to help with a solution?
Solved! Go to Solution.
Perfect. Thank you so much for your help. 😀
Create a custom column in Power Query with this expression, where Filename is the column name. The argument ChangeType is the previous step name.
AddDate = Table.AddColumn(
ChangeType,
"Date",
each Date.FromText(Text.Middle([Filename], Text.PositionOf([Filename], "_") + 1, 8))
)
Proud to be a Super User!
User | Count |
---|---|
70 | |
67 | |
62 | |
48 | |
28 |
User | Count |
---|---|
113 | |
78 | |
64 | |
55 | |
44 |