Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I have been given a file of current employees that has start dates and another file of terminated employees that has term dates but no start dates. Because this is prototype to prepare us for reviewing this kind of data going forward, I inserted a dummy start dates for the terminated employees (for testing purposes). I combined the current employees and terminated employees into one file as was done in the instructional youtube video: Calculating Staff Turnover In Power BI Using DAX - HR Insights
I then used the DAX expressions I copied from that video.
However, I am not getting the correct totals and have no idea what I've done wrong or how to fix it.
See details below:
***The following measure returns a total of 2,613 for current staff (ironically this is the total of the terms) but should be 11,080.
Current Staff =
CALCULATE( COUNTROWS( 'Staff Population' ),
FILTER( VALUES('Staff Population'[Start Date]), 'Staff Population'[Start Date] <= MAX( Dates[Date] ) ),
FILTER( Values('Staff Population'[Term Date] ), OR( 'Staff Population'[Term Date] >=MIN( Dates[Date] ), ISBLANK('Staff Population'[Term Date] ) ) ) )
Below image of the 'Current Staff' measure results:
***The following measure returns a total of 2 terminated employees but there should be a total of 2,613 Terminations.
Staff Turnover =
CALCULATE( COUNTROWS( 'Staff Population' ),
FILTER( VALUES('Staff Population'[Term Date] ), 'Staff Population'[Term Date] <= MIN( Dates[Date] ) ),
'Staff Population'[Term Date] <> BLANK() )
Below image of the 'Staff Trunover' measure results:
Below is the model relationship view
Below is the Data Table View
Data Table View
I have a pbix file I can share (it's all redacted data) but I can't upload it here.
Also, please let me know if you know of good (but inexpensive) Power BI desktop courses if you know of any.
Solved! Go to Solution.
@Anonymous , refer to my HR blogs and the comments. There is small change required for < /= , was causing some issue
@amitchandak, Wow! This is awesome! Thank you for pointing me to your HR blog! So helpful!!
@Anonymous , refer to my HR blogs and the comments. There is small change required for < /= , was causing some issue
@amitchandak, Wow! This is awesome! Thank you for pointing me to your HR blog! So helpful!!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
84 | |
69 | |
68 | |
39 | |
37 |