Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello everybody, Can you kindly help me calculate the number of employees on different dates, based on two conditions (hiring date and job completion date) by comparing these two values against the dates in a different table ?
| total at 19/02/2021 |
| total at the end of last year (31.12.2020) |
| total at the end of lastMONTH (29.01.2021) |
| total at 12/02/2021 (-7 day of lastdate) |
employees in force at the date | 429 |
| 381 |
| 413 |
| 418 |
|
|
|
|
|
|
|
|
employees in force at the date with at least two months of activity | 378 |
| 336 |
| 352 |
| 366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conditions |
|
|
|
|
|
|
|
DT_start | <= 19/2/21 aka last/maxdate other db |
| <= 31/12/20 aka total at the end of the previous year at the other db |
| <= 29/1/21 aka last MONTH at other db |
| <= 17/2/21 aka last/maxdate -7 DAY other db |
DT_end | >=19/2/21 aka last/maxdate other db |
| >=31/12/20 aka total at the end of the previous year at the other db |
| >=29/1/21 aka last MONTH at other db |
| >=17/2/21 aka last/maxdate -7 DAY other db |
id | <> * |
| <> * |
| <> * |
| <> * |
|
|
|
|
|
|
|
|
no one can help me?
Hi, @carlobonan
Why end date is bigger than start date in your excel table? Your requirements are easy to achieve, but I found that the results are a bit different from what you gave. Can you explain your logic more clearly? So we can help you soon.
Best Regards
Janey Guo
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.