Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Morning everyone,
I has one calendar table, like this:
Days: the days
IS WORKDAY: 1 if is workday, 0 if isn't work day
LAST WORKDAY: the workday -1
I need made this calculated column LAST WORKDAY, below i will put the expect result.
DAYS | IS WORKDAY? | LAST WORKDAY |
01/01/2023 | 1 | - |
02/01/2023 | 1 | 01/01/2023 |
03/01/2023 | 1 | 02/01/2023 |
04/01/2023 | 0 | 03/01/2023 |
05/01/2023 | 1 | 03/01/2023 |
06/01/2023 | 1 | 05/01/2023 |
Solved! Go to Solution.
You could create a column like
Last workday =
VAR CurrentDate = 'Date'[Date]
RETURN
CALCULATE (
MAX ( 'Date'[Date] ),
REMOVEFILTERS ( 'Date' ),
'Date'[Date] < CurrentDate,
'Date'[Is working day] = 1
)
You could create a column like
Last workday =
VAR CurrentDate = 'Date'[Date]
RETURN
CALCULATE (
MAX ( 'Date'[Date] ),
REMOVEFILTERS ( 'Date' ),
'Date'[Date] < CurrentDate,
'Date'[Is working day] = 1
)
Works great! Thank you my friend.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.