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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
MarcosGalvani
Microsoft Employee
Microsoft Employee

Count of Records between dates month per month

Hi,

 

I have a table like this:

 

ClientTypeStartDateEndDate
1F01/01/2019

19/10/2022

2P01/01/201919/10/2022
3F01/01/201912/12/2019

 

I need to total of clients per month between the Min(StartDate) and the Max(EndDate) in a table like this:

 

YearMonthCount
2019January3
2019February3
2019March

3

......  
2019December3
2020January2
... 

 

2022October

2

 

I would appreciate any help you can give me.

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1666181331345.png

 

 

Count clients measure: =
COUNTROWS (
    FILTER (
        Data,
        Data[StartDate] <= MAX ( 'Calendar'[Date] )
            && Data[EndDate] >= MIN ( 'Calendar'[Date] )
    )
)

 

    Microsoft MVP
 

 

   


      If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


   


     
        LinkedInVisit my LinkedIn page
     

   


   


     
        Outlook BookingSchedule a short Teams meeting to discuss your question

     

   


 


View solution in original post

2 REPLIES 2
MarcosGalvani
Microsoft Employee
Microsoft Employee

Genius! Thanks!

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1666181331345.png

 

 

Count clients measure: =
COUNTROWS (
    FILTER (
        Data,
        Data[StartDate] <= MAX ( 'Calendar'[Date] )
            && Data[EndDate] >= MIN ( 'Calendar'[Date] )
    )
)

 

    Microsoft MVP
 

 

   


      If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


   


     
        LinkedInVisit my LinkedIn page
     

   


   


     
        Outlook BookingSchedule a short Teams meeting to discuss your question

     

   


 


Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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