Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
peterso
Helper II
Helper II

Count for the entire current month (not just until today's date)

Hey folks,

 

First time posting on this awesome forum! I'm stumped with what should be a simple solution.

I'm trying to count the number of appointments for the entire current month. Using the MTD function counts until the current date, but I need a count for the entire month.

 

Thanks everyone!

3 REPLIES 3
lbendlin
Super User
Super User

Assuming you have a Dates table in your data model with a yearmonth column. If not then you should add that.

 

Full Month =

var m = selectedvalue(dates[yearmonth])

return Calculate (count(whatever),allselected(table),dates[yearmonth]=m)

 

That will give you the entire month, regardless of which day of that month is in focus.

I'm still getting an incorrect result. Maybe my formula is wrong?

 

Full Month = VAR m = SELECTEDVALUE('Date'[Month Year]) return CALCULATE(COUNT('Active Count'[Active Count Attribute]),ALLSELECTED('Active Count'[Active Count Attribute]), 'Date'[Month Year]=m)

If you are slicing data by dates, months, and year, then at the month level you must already get the total of that month.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.