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
LyonsBI_BRL
Helper III
Helper III

Count Number of Rows - Based on Start Date

I have rather an interesting challenge I'm looking at here. I need to calculate the number of employees who have started each month. And I need to also calculate the number of employees who have completed their assignement each month. I need to figure out how would I count the number of rows who have started during the month, the number of rows of people who have left or wil be leaving that month, and what my running total is each month.

 

LyonsBI_BRL_0-1637102979862.png

 

1 ACCEPTED SOLUTION

Hi,

I am not sure whether I understood your question correctly, but please check the below picture and the attached pbix file.

All measures are in the attached pbix file.

 

Picture1.png

 


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your data model looks like, but I suggest having a dim-calendar table like below.

Please check the below picture and the attached pbix file.

 

Picture2.png

 

Employees count: =
IF (
HASONEVALUE ( 'Calendar'[Month & Year] ),
CALCULATE (
COUNTROWS ( Data ),
FILTER (
Data,
MIN ( 'Calendar'[Date] ) <= Data[dateEnd]
&& MAX ( 'Calendar'[Date] ) >= Data[dateBegin]
)
)
)


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

@Jihwan_Kim That worked!

 

Is there a way I can see the net difference between each month from month to month?

 

LyonsBI_BRL_0-1637128723846.png

 

Hi,

I am not sure whether I understood your question correctly, but please check the below picture and the attached pbix file.

All measures are in the attached pbix file.

 

Picture1.png

 


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.