Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have the below fields in my table.
Employee ID, Start Date, End Date
I need to find the active employess present for previous year same month. (current month is Apr 2021, so the formula shoud take today as current date and give the filter for Apr 2020)
Start date <= Apr 30th 2020 AND (End date >= Apr 1st 2020 OR End date is Blank)
Please help
Solved! Go to Solution.
Hi @Anonymous ,
You could create a measure by the following formula:
count =
COUNTROWS (
SUMMARIZE (
FILTER (
'Table',
EOMONTH ( [Start date], 0 ) <= EOMONTH ( TODAY (), -12 )
&& (
EOMONTH ( [End date], 0 ) >= EOMONTH ( TODAY (), -12 )
|| [End date] = BLANK ()
)
),
'Table'[Name]
)
)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You could create a measure by the following formula:
count =
COUNTROWS (
SUMMARIZE (
FILTER (
'Table',
EOMONTH ( [Start date], 0 ) <= EOMONTH ( TODAY (), -12 )
&& (
EOMONTH ( [End date], 0 ) >= EOMONTH ( TODAY (), -12 )
|| [End date] = BLANK ()
)
),
'Table'[Name]
)
)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
You can try the following measure to get the count:
Emp Count =
VAR MinDate =
EOMONTH(TODAY(),-13) + 1
VAR MaxDate =
EOMONTH(TODAY(),-12)
RETURN
COUNTROWS(
FILTER(
Table,
EndDate=BLANK() OR
(
EndDate >= MinDate &&
StartDate <= MaxDate
)
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 71 | |
| 50 | |
| 46 | |
| 44 |