Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, I have managed to create a monthly Database that contains employee ID
I want a measure that check if this employee ID is available in the pervious month, If its not available then the Employee is New.
Same thing goes to Leavers, I want it to check the next month to check if the employee left or not
Solved! Go to Solution.
@Anonymous , I think you need very similar what I disucssed here
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
Hi @Anonymous ,
Not sure what your data table looks like, I created a table like this for testing.
Then please create a measure.
Measure =
VAR _pervious_month = MONTH(TODAY())-1
VAR _current_month = MONTH(TODAY())
VAR _employee_1 = CALCULATE(SUM('Table'[ID]),FILTER('Table','Table'[Month]=_pervious_month))
VAR _employee_2 = CALCULATE(SUM('Table'[ID]),FILTER('Table','Table'[Month]=_current_month))
RETURN
SWITCH(
TRUE(),
_employee_1=_employee_2&&_employee_1<>BLANK(),"in-service",
_employee_1<_employee_2,"New",
_employee_1>_employee_2,"Leavers"
)
If this doesn't work for you or I misunderstand your needs, please consider sharing more details about it. And it would be great if there was a sample file without any sensitive information here.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@Anonymous , I think you need very similar what I disucssed here
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
User | Count |
---|---|
94 | |
79 | |
74 | |
63 | |
60 |
User | Count |
---|---|
110 | |
101 | |
84 | |
64 | |
62 |