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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All!
I have a query that requires me to return the date 10 days ago from yesterday where it only counts Business Days and skips weekends, bank holidays etc.
For Example, yesterdays date was "03/11/2022", I would need the measure to calculate the previous 10 days before this where it is ONLY a business day, so in theory this should return "21/10/2022" as this was 10 Business Days ago, however the below DAX returns "24/10/2022" so this is clearly counting Non Business Days.
Solved! Go to Solution.
@Adam01 Maybe:
Measure =
VAR LastDateExpr = LASTDATE ( 'Calendar'[Date] )
VAR __Table = FILTER('Calendar',[Date] <= LastDateExpr && [Date] >= LastDateExpr - 14 && WEEKDAY([Date],2) < 6)
VAR __Table1 = ADDCOLUMMNS(__Table, "__DaysAgo", COUNTROWS(FILTER(__Table,[Date] >= EARLIER([Date]))))
VAR CalcExpr = MAXX(FILTER(__Table1, [__DaysAgo] = 10),[Date])
RETURN
CalcExpr
@Adam01 Maybe:
Measure =
VAR LastDateExpr = LASTDATE ( 'Calendar'[Date] )
VAR __Table = FILTER('Calendar',[Date] <= LastDateExpr && [Date] >= LastDateExpr - 14 && WEEKDAY([Date],2) < 6)
VAR __Table1 = ADDCOLUMMNS(__Table, "__DaysAgo", COUNTROWS(FILTER(__Table,[Date] >= EARLIER([Date]))))
VAR CalcExpr = MAXX(FILTER(__Table1, [__DaysAgo] = 10),[Date])
RETURN
CalcExpr
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 20 | |
| 13 | |
| 11 |