Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Power Query, convert date fields to monthname, weekdayname, quartername

When using power Query to add columns based on A date field, it would be Nice to also be able to convert to month name, not just month number. Example; 31.01.2012 should have built-in function to set december or dec....monday or mon. Till now, we can only get numeric values.
Status: Completed
Comments
nishalit
New Member
I'm glad to report that this transformation is now available in the June Update of Power BI Desktop: https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-june-update/ Extract Week Day and Month Name from a DateTime column Another very common customer request has been to provide a built-in transformation to extract the WeekDay or Month names from a given Date/Time column. We’ve made this available from the Query Editor ribbon (either via Transform to modify an existing column, or via Add Column to insert a new one). These two options can be found under “Date -> Day -> Name of Day” and “Date -> Month -> Name of Month”, respectively. Note that the Day/Month names are localized according to the Locale setting for your Power BI Desktop file (available under File -> Options -> Current File -> Regional Settings).
frank_rowan
New Member
I agree! Meanwhile, any hints on how to use a List function (List.Select?) to transform integer to monthname?
dhoff
Regular Visitor
Terje, You can add a custom column with this formula to =Date.ToText([Date],”MMM”) to return the month name.
lmatera
Frequent Visitor
You also can try this: =FORMAT([date],"MMM") BUT it will order it by month name, not by month number......
adeeljaffer
New Member
'@dhoff can you please help where to add this formula
timoconnellaus
Advocate I
You can use the formula =FORMAT([date],"MMM") that Luis suggested then sort it by =Month([date]). To sort it by a separate column you can use the "Sort By Column" in the data tab.
roberthutching1
New Member
This is essential The format date is not suitable for the reason given
back5576
New Member
If you do =FORMAT([date],"MMM") how do you prevent Power BI visualizations from screwing up the sort?
fbcideas_migusr
New Member
It is not working, with Format function. I have pulled the data from SharePoint. While trying to get the month name from Created field. For July it gives the month name as January while using the Format function.
bchanzy
New Member
Add a column =wekday([date]) Create a table (1..7)-(sun...sat) Create relationship