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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
GilesWalker
Skilled Sharer
Skilled Sharer

How to change date format to be day of week?

Hi everyone,

 

For some of our customers we have agreed numbers of units they will provide for us on each day, these units vary on product and also by day. For example, Product A is agreed to be given 16 times a day except Sundays, Product B 12 times except Monday and Thursday, etc.

 

Writing the formula in excel is easy, if(date="Sun", 0, 16). However I cant seem to do this in Power BI. The table I need to do this in has a date column but I cant seem to either create a column with a formula with the day in it, or get the formula to find the word (Sunday for example).

 

Hope you can help.

 

Thanks,

 

Giles

1 ACCEPTED SOLUTION

thansk for the response @Anonymous, the links provided me with some ideas. I ended up inserting a column with the following formula:

 

weekday(Date[date key],1). This will give a number for every date, Sunday being 1, Monday 2 etc. Then I could use an if formula to search off of the numbers.

 

Thanks,

 

Giles

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@GilesWalker It sounds like using a date table will go a long way in helping you out here. There are a bunch of ways to go about this, here are just a few depending on how you are implementing your model.

 

Azure Market Place

SQL

 

I almost always use a date dimension, it just simplifies so much in shaping the data the way I want to see it. You could then write your formula using the new dimension.

thansk for the response @Anonymous, the links provided me with some ideas. I ended up inserting a column with the following formula:

 

weekday(Date[date key],1). This will give a number for every date, Sunday being 1, Monday 2 etc. Then I could use an if formula to search off of the numbers.

 

Thanks,

 

Giles

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.