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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

SUM countrows measure

I have a measure that grabs the count of appointments each day in a COUNTROWS measure,

 

Count Appointments = 
COUNTROWS(FILTER('Appointment Times with date','Appointment Times with date'[Working Hours]= "Yes"))

 

However I'd trying to comeup with a way to count this measure (e.g. 33 appointments a day) between two dates e.g. 09/09/2021 and 16/09/2021.

 

Thanks

 

File here

https://www.dropbox.com/s/yp912cepf4x3rec/Appointment%20Count%20Test.pbix?dl=0

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

So, it sounds like you just want to filter your data for specific dates, right?

In that case, you just need to put your measure into a visual with dates in it, then put your dates into a slicer on the page and set the slicer to a 'Between' type, like this:

BA_Pete_1-1630995341123.png

 

Pete

 

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Try this measure:

_appointmentsPerDay =
VAR __noofDays =
DATEDIFF([Scalar Start Date], [Scalar End Date], DAY)
RETURN
DIVIDE([Count Appointments], __noofDays, 0)

 

You will need a way to populate the scalar date values, whether this is through measures or slicer selections etc. is up to you, but you'll need to find a way to get those in there.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Thanks for this. It's along the lines of what I need but rather than divide the no of days by appointment .

 

Is it possible to have something like:

 

_appointmentsPerDay =
VAR __noofDays =
DATEDIFF("09/09/2021", "16/09/2021", DAY)
RETURN
SUM([Count Appointments] over these dates?
 
e.g. 33 appointments per day over 7 days = 231 apps.
 
thanks again!

 

Hi @Anonymous ,

 

So, it sounds like you just want to filter your data for specific dates, right?

In that case, you just need to put your measure into a visual with dates in it, then put your dates into a slicer on the page and set the slicer to a 'Between' type, like this:

BA_Pete_1-1630995341123.png

 

Pete

 

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.