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
Hi All,
I am new to Power BI/DAX, need your help to calculate Attrition measure for the below data:
| Input | ||
| Month | Employee key | Last working Day |
| 1/1/2022 | 1111 | null |
| 1/1/2022 | 1112 | 21/01/2022 |
| 1/1/2022 | 1113 | null |
| 2/1/2022 | 2222 | 15/02/2022 |
| 2/1/2022 | 2220 | 13/02/2022 |
And my ouput should be:
| Output | |
| Month | Attrition |
| Jan-22 | 1 |
| Feb-22 | 2 |
Please help me to get this logic for me,
Thanks
Solved! Go to Solution.
Hi @Anonymous , If the Last Working Day column's data type is date you can do...
CALCULATE (
COUNTA ( 'Table'[Employee key] ),
ISBLANK ( 'Table'[Last working Day] ) = FALSE ()
)
if the Last Working Day column's data type is text then you can do....
CALCULATE (
COUNTA ( 'Table'[Employee key] ),
'Table'[Last working Day] <> "null"
)
Proud to be a Super User!
Hi @Anonymous , If the Last Working Day column's data type is date you can do...
CALCULATE (
COUNTA ( 'Table'[Employee key] ),
ISBLANK ( 'Table'[Last working Day] ) = FALSE ()
)
if the Last Working Day column's data type is text then you can do....
CALCULATE (
COUNTA ( 'Table'[Employee key] ),
'Table'[Last working Day] <> "null"
)
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |