Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I found that the Data type conversion for Date in Power Query did not work from Sept for the web source :
https://au.finance.yahoo.com/quote/%5EHSI/history/.
Any clue to this
Solved! Go to Solution.
Hey @Schch ,
as @Alex87 said promote first row to headers, you can find how to do that here: Promote or demote rows and column headers (Power Query) - Microsoft Support
And then you get error because 'Sept' is not official shortened version of september - it should be 'Sep'. So before you change column type to date add a step and replace 'Sept' to 'Sep' (instructions: Replace values (Power Query) - Microsoft Support) or just use this M code:
= Table.ReplaceValue(#"Changed Type","Sept","Sep",Replacer.ReplaceText,{"Date"})
After that just check if other months use correct short version of the month and if not change it in the same manner before converting to date type.
Hope it helps!
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hey @Schch ,
as @Alex87 said promote first row to headers, you can find how to do that here: Promote or demote rows and column headers (Power Query) - Microsoft Support
And then you get error because 'Sept' is not official shortened version of september - it should be 'Sep'. So before you change column type to date add a step and replace 'Sept' to 'Sep' (instructions: Replace values (Power Query) - Microsoft Support) or just use this M code:
= Table.ReplaceValue(#"Changed Type","Sept","Sep",Replacer.ReplaceText,{"Date"})
After that just check if other months use correct short version of the month and if not change it in the same manner before converting to date type.
Hope it helps!
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
May I know why this function;
= Table.AddColumn(#"Added Custom4", "Month Name", each Date.ToText([DateKey],"MMM"))
returns Sept i.s.o. Sep?
Other short month name works perfectly (ie, Jan, Feb, Mar, Apr, May, Jun, July, Aug, Oct, Nov, & Dec)
Thanks moncx, the step of replace value for Sept with Sep.. it works.
schch
Hi @Schch
I wasn't able to connect to the site, so for demonstration purposes, I downloaded your table as a CSV. From there, the steps are: 1. Promote the headers to the top row, and 2. Convert the date field to a local date.
The pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @Schch
1 Please delete the change type step
2. Use the first row as a header option to select Date, Open, High etc as a column header
3. Set a locale or region for data (Power Query)
Step by step information - https://www.myonlinetraininghub.com/change-type-using-locale-with-power-query
Please let me know if above steps not works
Proud to be a Super User! | |
Hello @Sch ,
From what I see your first row needs to be promoted as headers (eg column 1 should be called Date)
In which concerns the date type, try using locale date (right click on column title, change type, using locale, date & locale)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
70 | |
37 | |
29 | |
26 |
User | Count |
---|---|
91 | |
49 | |
44 | |
38 | |
37 |