Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a calendar table that runs through 2025, and I want to sum the number of business days for all previous months up until the present day in December. How can I write a formula to do this?
=
MAXX(
KEEPFILTERS(VALUES('date'[date])),
CALCULATE(SUM('Date'[Business Days Passed]),filter('date','date'[date]=today()-1)))
This only shows the total business days in December so far, and shows it for every month which is not what I want.
I would like
September 21
October 22
November 21
December 8
Solved! Go to Solution.
I'm guessing given how your formula looks that the Business Days Passed column is something that has a 1 if it is a business day and a 0 if it doesn't - how about making a column that compares the date in your date table and populates it with a 1 or a 0 dependent on whether the date in the date table is before today or not? You could then countrows conditional on both column's status, or, equivalently, do a sumx of multiplying the two columns together?
I'm guessing given how your formula looks that the Business Days Passed column is something that has a 1 if it is a business day and a 0 if it doesn't - how about making a column that compares the date in your date table and populates it with a 1 or a 0 dependent on whether the date in the date table is before today or not? You could then countrows conditional on both column's status, or, equivalently, do a sumx of multiplying the two columns together?
Oh my god you literally saved me from insanity. I have been too far into this problem I was having to even think of something as simple as that. I wish I could give you 10,000 kudos oh my goodness.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
82 | |
67 | |
61 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |