cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Community Support
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")

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper I

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

13 REPLIES 13
Community Support
Hi @joannerw ,

Click new column and enter the DAX formula:
Weekday = FORMAT ( 'Test'[Date], "dddd" )

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper I

@V-lianl-msft this is the result:

Community Support
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")

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helper I

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

Super User

Hello @joannerw,

Please use the following DAX formula:

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

Hope this helps.

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!

Helper I

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??

Super User

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

Helper I

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.

Super User

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

Helper I

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

Helper I

@rajulshah  this is how my Power BI Desktop appears:

Super User

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.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors