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!View all the Fabric Data Days sessions on demand. View schedule
Hello,
I created a measure in Power BI to calculate the difference between sales from one day to the next. The sales report runs Mon to Fri only. Therefore I need the formula to subtract Monday's sales value from Friday's sales value. Can someone please help with the formula below to ignore weekend dates.
Solved! Go to Solution.
Hello @jgeddes ,
Unfortunately, the below did not work for me. I figured out another formula to use which worked.
Hi @gmasta1129 ,
Great to hear that it's working from your end! Could you please share the solution? It would be really helpful for others in the community who might be facing similar issues and can address them quickly. Also, I would suggest accepting your approach as the solution so that it can benefit others as well.
Thank you.
Hi @gmasta1129 ,
May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.
Thank you.
Hi @gmasta1129 ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you @jgeddes for the prompt response.
I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.
Thank you.
Hello @jgeddes ,
Unfortunately, the below did not work for me. I figured out another formula to use which worked.
Here is one way to do this in DAX. (There are probably better ways...)
Consider sales data...
I get the final result of...
Using three measures.
Sales (Weekday Only) =
var _vTable =
SUMMARIZE(
financials,
financials[Date],
"__sales", IF(NOT(WEEKDAY(financials[Date]) IN {1,7}), SUMX(financials, financials[Sales]), BLANK())
)
RETURN
SUMX(_vTable,[__sales])Sales (Previous Workday) =
var _vTable =
SUMMARIZE(
financials,
financials[Date],
"__sales",
IF(
NOT(WEEKDAY(financials[Date]) IN {1,7}),
SUMX(
FILTER(
ALL(financials),
financials[Date] = MAXX(
FILTER(ALL(financials), (NOT WEEKDAY(financials[Date]) IN {1,7}) && financials[Date] < SELECTEDVALUE(financials[Date])),
financials[Date]
)
),
financials[Sales]
),
BLANK()
)
)
RETURN
SUMX(_vTable,[__sales])Sales Delta From Previous Weekday =
[Sales (Weekday Only)] - [Sales (Previous Workday)]
This methodology will find the sales from the previous day that is not Saturday or Sunday. Meaning it does not rely on Mondays or Fridays at all.
I have attached the pbix if you want to play with it.
Proud to be a Super User! | |
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 |
|---|---|
| 10 | |
| 8 | |
| 6 | |
| 5 | |
| 3 |