Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have 2 Excel files with a Source that has this Column 'Date' (see below) in my 1 Excel it converts fine but in the other it converts it to Month as Date and Date as month see other image below.
This should be March 1, April 1, May 1 and not January 3, 4, 5 ... |
Have you tried Table.AddColumn(Date.FromText([DATE]))
Date.FromText, instead of ToText?
Date |
8/1/2021 |
9/1/2021 |
10/1/2021 |
With the above sample date column in excel, I get the correct date with either excel connector and enter date feature in Power Query. I cannot reproduce the 1/4/2021 format in the PQ, that turns the April 1st to Jan 4th.
Please try with Power Query in power bi desktop. This problem could be the Excel Power Query.
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@ovetteabejuela
What is the date format in the original excel file, are both date columns are the same data type and format? Can you show a screen short.
Paul Zheng _ Community Support Team
In Excel this is in General Type, and it is basically of type Text
Actual Source Screenshot:
Below, I am showing you how it is translated within Excel environment and into Power Query.
You need to convert the Date Column to Date format before doing Date.ToText. Right now it looks like you are performing a Date Operation on a text column.
--Nate
Actually that is the very first thing that anyone will do even the system will automatically convert your data after you promote to Headers BUT converting this to date will yeild the same result that is why what your seeing are non-convetional approach.
Converting immediately (as usual) to date will result to January 3, January 4, January 5..... instead of March 1, April 1 and May 1
By the way I already tried using Locale but it too doesn't work my currect solution is not advisable because if the source will change it's format it will not work... Basically I split this by delimeter and added a custom column with this syntax #date() - this worked but again it's not flexible.
I just can't understand why it worked in another Excel (this was older but the same source) and did not work in my version today.
@ovetteabejuela , you may want to try,
Table.AddColumn(Source, "Custom", each Date.ToText(Date.From([Date]), "MMMM d, yyyy"))
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Unfortunately...
and my Regional settings is fine: