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.
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
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 |
---|---|
111 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |