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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
gmasta1129
Resolver I
Resolver I

Previous Day - Excluding Weekend

Hello,

 

I have a report that runs 5 days a week (excludes weekends).  There is a "Run Date" column which contains the date the report was run.  I would like to retreive the previous day from the run date but I am having an issue because of weekend dates.  

 

For example, August 29th is a Monday.  Run Date = 8/29/2022.  The Previous Day should be Friday August 26th 2022 8/26/2022 

and not Sunday August 28th  8/28/2022

 

What type of formula can i use for this? 

1 ACCEPTED SOLUTION
ahmadibrahimbus
Resolver III
Resolver III

Dear @gmasta1129 ,

please use the below dax:

Previous_date = if( FORMAT(Sheet1[Run Date], "dddd")="Monday",Sheet1[Run Date]-3,Sheet1[Run Date]-1)
let me know if it's help.

View solution in original post

2 REPLIES 2
gmasta1129
Resolver I
Resolver I

Worked perfectly. Thank you for your help! 

ahmadibrahimbus
Resolver III
Resolver III

Dear @gmasta1129 ,

please use the below dax:

Previous_date = if( FORMAT(Sheet1[Run Date], "dddd")="Monday",Sheet1[Run Date]-3,Sheet1[Run Date]-1)
let me know if it's help.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.