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

Don'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.

Reply
joannerw
Helper I
Helper I

WEEKDAY column convert numbers to text as days of week

Hi. I have inserted a column to identify the days of the week, but I'd like to show them as text, rather than the number of their position in the week. Is this possible.

 

2 ACCEPTED SOLUTIONS

Hi @joannerw ,
 
Sorry, it was my mistake just now. I didn't notice the DQ connection mode you used.
You can use the "SWITCH" function to convert numbers to text.
Please try to use DAX like this:
weekday = SWITCH(test0109[Column],1,"Monday",2,"Tuesday",3,"Wednesday",4,"Thursday",5,"Friday",6,"Saturday",7,"Sunday")
test_weekday.PNG
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@V-lianl-msftthat worked perfectly. Thank you!!

View solution in original post

13 REPLIES 13
V-lianl-msft
Community Support
Community Support

Hi @joannerw ,
 
Click new column and enter the DAX formula:
Weekday = FORMAT ( 'Test'[Date], "dddd" )
Inked2020-01-09 11_34_34-HR Dashboard - Power BI Desktop (September 2019)_LI.jpg
 
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@V-lianl-msft this is the result:

 

2020-01-09 12_47_48-HR Dashboard - Power BI Desktop (September 2019).jpg

Hi @joannerw ,
 
Sorry, it was my mistake just now. I didn't notice the DQ connection mode you used.
You can use the "SWITCH" function to convert numbers to text.
Please try to use DAX like this:
weekday = SWITCH(test0109[Column],1,"Monday",2,"Tuesday",3,"Wednesday",4,"Thursday",5,"Friday",6,"Saturday",7,"Sunday")
test_weekday.PNG
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@V-lianl-msftthat worked perfectly. Thank you!!

rajulshah
Memorable Member
Memorable Member

Hello @joannerw,

 

Please use the following DAX formula:

Weekdays = FORMAT(Date[Date],"dddd")

 

Hope this helps. 

itsme
Resolver I
Resolver I

If you have a Date column, you can do this create a new column:

WeekdayText = FORMAT ( 'Table'[Date], "dddd" )

 

This will create a column with Sunday, Monday, Tuesday, etc. Use "ddd" if you want Sun, Mon, Tue....

 

Then highlight the new column, click the Column Tools tab, click the Sort by Column button and select the week number column you previously created. This will sort the text values, ensuring they are in proper order when you add them to a visual.

 

If this solves your question, please mark it as the solution. Thanks!

Thanks for your response. I'm new to Power BI and not sure where I enter this formula. Is it through the New Column icon on the Calculations tab or the query editor. I attempted both but it didn't work for me. can you please provide more detail on how to use the formula??

In the DATA View, where you can see data. In-home tab , you have an option for new Column. Use that to have this formula

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I don't have the Data view available, only Report or Model. I'm using the desktop version and am running the September 2019 version and also using a direct query. Maybe I don't have access to the Data view.

In Direct Query, you won't be able to see the data. Did you try as I suggested?

Again, i'm not sure where to use this formula. I'm unable to create a new table or see the data view....

@rajulshah  this is how my Power BI Desktop appears:

 

2020-01-09 11_34_34-HR Dashboard - Power BI Desktop (September 2019).jpg

Hello @joannerw,

Suppose your date table is named as 'Calendar', then you created a new calculated column in that table and use the formula as 

Weekdays = FORMAT(Calendar[Date],"dddd")

Please provide what error/result are you getting using this query.

 

PS:Calendar table can be created using CALENDAR DAX function.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.