Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Good Day
How can I change the below formula to calculate the sales for this month, but only for completed days?
The below formula is reading for the previous year.
Solved! Go to Solution.
Hi @bvanderwatt ,
Try this
MTD NSls LY (Completed days) =
VAR _TODAY = TODAY()
var endLastYear = _TODAY-1
var startLastYear = EOMONTH( _TODAY, -1) + 1
RETURN
CALCULATE(
'Combined Sales'[Sum of Inv+Order],
DATESBETWEEN( 'Calendar'[Date], startLastYear, endLastYear)
)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @bvanderwatt ,
Try this
MTD NSls LY (Completed days) =
VAR _TODAY = TODAY()
var endLastYear = _TODAY-1
var startLastYear = EOMONTH( _TODAY, -1) + 1
RETURN
CALCULATE(
'Combined Sales'[Sum of Inv+Order],
DATESBETWEEN( 'Calendar'[Date], startLastYear, endLastYear)
)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Easiest way is probably just to put a filter on the report chart/page that excludes today.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
64 | |
63 | |
52 | |
36 | |
36 |
User | Count |
---|---|
80 | |
71 | |
58 | |
45 | |
44 |