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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I am trying to calculate the active employee's in the company between the dates i put in my date filter. I've got a master date table that I am using in the date filter. Below is the measure I am currently using but it keeps coming up with "blank":
Solved! Go to Solution.
Hi @Anonymous
If active employees refer to the ones who are working for this company between selected date the period.
For example, if i select date 2018/7/1~2019/4/17, then active employees should be hired before or at 2018/7/1, leave after 2019/4/17.
If my assumption is the same as your scenario,
Please create such relationship
create such measure
Measure = CALCULATE(COUNT('code table'[code]),FILTER(Sheet4,Sheet4[hired]<=MIN('calendar'[Date])&&Sheet4[leaving]>MAX('calendar'[Date])))
Best Regards
Maggie
Hi @Anonymous
If active employees refer to the ones who are working for this company between selected date the period.
For example, if i select date 2018/7/1~2019/4/17, then active employees should be hired before or at 2018/7/1, leave after 2019/4/17.
If my assumption is the same as your scenario,
Please create such relationship
create such measure
Measure = CALCULATE(COUNT('code table'[code]),FILTER(Sheet4,Sheet4[hired]<=MIN('calendar'[Date])&&Sheet4[leaving]>MAX('calendar'[Date])))
Best Regards
Maggie
Hi @Anonymous
I am not sure if the following approach can work for you.
The approach assumes you have a CalendarTable. My fact table is FactHR. The two tables are linked on Date field in both tables.
1. Compute Continuing Employees
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 64 |