Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
The FORMAT function for date is returning the date on Dd-MM-YYYY instead of Month when given
Column = FORMAT( CONTRACT[CONTRACT_DT,"DDDD"])
Solved! Go to Solution.
@v-kpoloju-msft Thanks for checking It started working when I have given the correct the given format.Thanks @FBergamaschi
Hi @D_BinduMadhavi,
Thank you for reaching out to the Microsoft fabric community forum. Also, thanks to @FBergamaschi, for his inputs on this thread.
You are very close, "DDDD" actually returns the day of week (like Monday), not the month. To show the month name, use "MMMM" (full) or "MMM" (abbreviation).
For example: Month Name = FORMAT(CONTRACT[CONTRACT_DT], "MMMM")
If you also add Month No = MONTH(CONTRACT[CONTRACT_DT]), you can sort Month Name by Month No (Modelling → Sort by column) so months appear Jan–Dec instead of alphabetically. Please also double check that CONTRACT[CONTRACT_DT] is a Date/DateTime column FORMAT expects a real date for best results.
Refer this link for more information: https://learn.microsoft.com/en-us/dax/format-function-dax
Hope this helps. If you have any doubts regarding this, please feel free to ask here. We will be happy to help.
Thank you for using the Microsoft Community Forum.
Hi @D_BinduMadhavi,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.
Thank you.
@v-kpoloju-msft Thanks for checking It started working when I have given the correct the given format.Thanks @FBergamaschi
Hi @D_BinduMadhavi , if you had a solution, please mark it as such
Thanks!
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi @D_BinduMadhavi,
Thanks for the update, and I’m glad to hear it’s working after correcting the format.
Appreciate you sharing what resolved the issue that will definitely help others in the community facing a similar scenario.
Thank you.
@FBergamaschi ,Thank you very much for your reply. I have tried the above format as well, its returing the exact date in the new column instead of returning month when given MM and day when DDDD is given....! Is there any settings that I can do in my BI tool for my FORMAT function to work properly?
Can you please share the pbix via some cloud service and post the link here (or in a private message) so I check the issue?
Please mention me or I los the thread
Thanks
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
The syntax you mention
Column = FORMAT( CONTRACT[CONTRACT_DT,"DDDD"])
Cannot work
In case
Column = FORMAT( CONTRACT[CONTRACT_DT],"DDDD")
But you want the month so
Column = FORMAT( CONTRACT[CONTRACT_DT,"mm"])
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 14 | |
| 10 | |
| 5 | |
| 5 |