Forum Discussion
DH3612
2 years agoFrequent Visitor
Counting Employees at Specific Dates
OK, Im new to the DAX/PowerBI thing, but ive done well so far in making it work. But I am stumped on this one. I have a measure I created. Current Employees at Date. This should count the number...
DH3612
2 years agoFrequent Visitor
I think thats part of the issue. I was using the Date table to filter it.
However as an example - if we imagine this table is "Staffmaster" and asked how many people were employed at 28/02/2023, we should get 6. If we said how many employed 01/04/2023 we should get 9 and so on.
If my code isnt correct, is there an alternative?
| Name | Start Date | End Date |
John | 01/12/2020 | |
| Babs | 04/04/2021 | 06/04/2023 |
| Nick | 01/12/2019 | 01/08/2022 |
| Ed | 05/06/2018 | |
| Frank | 06/09/2010 | |
| Bob | 01/07/2009 | |
| Alfie | 01/03/2023 | 05/08/2023 |
| Jack | 01/09/2021 | |
| Claire | 27/01/2008 |
- oritam32102 years ago
Helper I
Hi,
I took the sample data and the same calculation,
it seems to be working.
the numbers should be "7" for the 28/02/2023 and "8" for the 01/04/2023
see examples
28/02/202301/04/2023
- DH36122 years agoFrequent Visitor
What slicer/filter are you using? When I run it on the full dataset, I cant even get an answer close to what I expect.
The dax code is exactly as used in the first example. Maybe its how I filter/slice the data for this visual?