Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
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!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |