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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
hallang
Frequent Visitor

Showing count of new start employees by month

Hi,

I am trying to add a 'card' to show the number of new start employees in any current month.  I ahve copied a formula from google but it doesnt seem to be working -

New Start Employee Count =
VAR CurrentMonthStart = STARTOFMONTH(TODAY())
VAR CurrentMonthEnd = ENDOFMONTH(TODAY())
RETURN
CALCULATE(
    COUNTROWS(Sheet1),
    Sheet1[start date ] >= CurrentMonthStart,
    Sheet1[start date ] <= CurrentMonthEnd
)
 
Can anyone suggest how I can do this?
1 ACCEPTED SOLUTION
BenjaminSNN
Frequent Visitor

Hey!

I think STARTOFMONTH() and ENDOFMONTH() can only be used in a table context. You should use EOMONTH(). 
I've altered the code for you:

New Start Employee Count =
VAR CurrentMonthStart = EOMONTH(TODAY(), -1) + 1 // End of last month plus one day is first of this month
VAR CurrentMonthEnd = EOMONTH(TODAY(), 0)

RETURN
CALCULATE(
    COUNTROWS(Sheet1),
    Sheet1[start date ] >= CurrentMonthStart,
    Sheet1[start date ] <= CurrentMonthEnd
)

View solution in original post

2 REPLIES 2
BenjaminSNN
Frequent Visitor

Hey!

I think STARTOFMONTH() and ENDOFMONTH() can only be used in a table context. You should use EOMONTH(). 
I've altered the code for you:

New Start Employee Count =
VAR CurrentMonthStart = EOMONTH(TODAY(), -1) + 1 // End of last month plus one day is first of this month
VAR CurrentMonthEnd = EOMONTH(TODAY(), 0)

RETURN
CALCULATE(
    COUNTROWS(Sheet1),
    Sheet1[start date ] >= CurrentMonthStart,
    Sheet1[start date ] <= CurrentMonthEnd
)

Hi!

 

That seems to work perfectly! Thank you so much!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.