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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register 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 @Seth_C_Bauer, 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
Seth_C_Bauer
Community Champion
Community Champion

@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.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

thansk for the response @Seth_C_Bauer, 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors