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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
alpeytongreene
Helper II
Helper II

Start Date and End Date counting for months in between

I am working on a contract labor dashboard, I need to count the person in contract from their start date through their end date- without having to create multiple entries per each labor.

 

Example:

Bob Smith started 01-01-2021 and ends July 30, 2021- so Bob would count January, February, March, April, May, June, and July 

Sally Sue started February 15 and ends May 15- so Sally would count February, March, April, and May. 

 

It would be filtered multiple ways from the same data. 

 

Is there a way to do this where I would not have to manually update/enter the data for each month? 

5 REPLIES 5
gvrajesh
Frequent Visitor

@alpeytongreene 

Create datetable and measure like below

gvrajesh_1-1614830092884.png

 

gvrajesh_0-1614829877050.png

gvrajesh_2-1614830131264.png

 

 

 

 

 

Will it work if I already have that data in my model just not as a direct table. 

If you've date table...that will work

Anonymous
Not applicable

@gvrajesh What should we join the Date table to on with fact table? Start Date? Or no need to join?

@gvrajesh 

I have the formula set as: 

Count =
VAR Tab =
FILTER('CL Labor Count Table',
'CL Labor Count Table'[Start Date]<= MAX('Date Table'[Date])
&& 'CL Labor Count Table'[End Date]>= MIN('Date Table'[Date])
)
RETURN
CALCULATE(COUNT('CL Labor Count Table'[Lawson ID]), Tab)
 
 
but this is  only showing to the start month. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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