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
Agent007
Regular Visitor

Previous workday "switch" calculated column

I have a two date tables. One created using DAX and another from imported from excel. I have created a workday column based on the two tables "Workday = If(or('Date'[WeekdayNo] = 1,'Date'[WeekdayNo]=7),0,If(isblank(RELATED(HOLIDAYS[HolidayDesc])),1,0))".

 

I've also created a column that returns the date of the previous workday "PrevWorkDay =VAR NextWorkingDay =MAXX (FILTER ('Date','Date'[Date] < EARLIER ( 'Date'[Date] )&&'Date'[Workday] = 1),'Date'[Date])RETURN IF ( 'Date'[Workday] = 0, NextWorkingDay, NextWorkingDay )"

 

I would like one more column that would allow for a filter (Yes/No or 0/1) for previous workday based on today's date. 

 

0 REPLIES 0

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.