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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
driplytics
Frequent Visitor

Get Days of the week from number 1 to 7

My dataset has no date column, but contains Dayofweek  from Number 1 to 7.

I want to Create a Column that Returns Monday to Friday instead.

 I had to use IF then Function (like shown in the image below) to get this. But i Know there is a better and more efficient way to get this using a simple Dax formula.

Probably, takes the Number like 1 and Return Monday in a column. i would appreciate if i could get your suggestions

 


Day of the week.png

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @driplytics ,

 

As @tamerj1  mentioned before, you can use switch like this:

 

Weekday =
SWITCH (
    [DayOfWeek],
    1, "Monday",
    2, "Tuesday",
    3, "Wedensday",
    4, "Thursday",
    5, "Friday",
    6, "Saturday",
    7, "Sunday"
)

 

Output:

vjianbolimsft_0-1657523346424.png

 

Also, you can create a new table like this:

 

Table =
SELECTCOLUMNS (
    CALENDAR ( TODAY (), TODAY () + 6 ),
    "Weekday", FORMAT ( [Date], "dddd" ),
    "DayOfWeek", WEEKDAY ( [Date], 2 )
)

 

Output:

vjianbolimsft_1-1657523346424.png

 

 

Best Regards,

Jianbo Li

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

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @driplytics ,

 

As @tamerj1  mentioned before, you can use switch like this:

 

Weekday =
SWITCH (
    [DayOfWeek],
    1, "Monday",
    2, "Tuesday",
    3, "Wedensday",
    4, "Thursday",
    5, "Friday",
    6, "Saturday",
    7, "Sunday"
)

 

Output:

vjianbolimsft_0-1657523346424.png

 

Also, you can create a new table like this:

 

Table =
SELECTCOLUMNS (
    CALENDAR ( TODAY (), TODAY () + 6 ),
    "Weekday", FORMAT ( [Date], "dddd" ),
    "DayOfWeek", WEEKDAY ( [Date], 2 )
)

 

Output:

vjianbolimsft_1-1657523346424.png

 

 

Best Regards,

Jianbo Li

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

tamerj1
Super User
Super User

@driplytics 

You can use SWITCH function 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.