This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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 April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 23 | |
| 23 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 36 | |
| 30 | |
| 23 | |
| 22 |