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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.