Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi community,
I've a doubt regarding Date Formatting in M-Query.
I'm trying to learn and execute Date formatting in M-Query using below M-Query code:
Table.TransformColumns(Source, {{"DateColumn", each DateTime.ToText(_, "yyyy-MM-dd"), type text}})
I'm doing the transforming in Calendar Date Master Table.
I've Date and Year column and based on the Date column I'm trying to Create a Custom column named (Custom Date Format) using M-Query.
Below is the error snip:
Please help!
Solved! Go to Solution.
Hi @Niraj_vora0106 ,
How about this:
You could, however, also change the date format in Power BI:
Thereby, you wouldn't need to create a new column in Power Query.
Hope this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @Niraj_vora0106 ,
How about this:
You could, however, also change the date format in Power BI:
Thereby, you wouldn't need to create a new column in Power Query.
Hope this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
@Niraj_vora0106 Try:
#"Added Custom Column" = = Table.AddColumn(#"Changed Type", "Custom Date Format", each DateTime.ToText([Date], "yyyy-MM-dd"))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |