Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I have a list of employees with dates of admission and dismissal. I need to show a list of active employees on a date that the user will choose. Could you help me how to solve?
Solved! Go to Solution.
Hi @JorgePereira ,
According to your needs, you want to get a list of employees in the Active status by filtering different dates. I did the following test, which can be used as a reference: first obtain the maximum and minimum values of the date in the slicer, and then judge in the if condition. The mark that meets the condition is “Active”, and the one that is not satisfied is “Terminated”. Then put the measure into Filters to filter out the list of Active employees.
Cur_Status =
IF (
MAX ( [Termination Date] ) = BLANK (),
IF ( MAX ( [Hire Date] ) >= [First_Slicer_Date], "Active","Terminated" ),
IF (
MAX ( [Termination Date] ) <= [Second_Slicer_Date]
&& MAX ( [Hire Date] ) >= [First_Slicer_Date],
"Acitve",
"Terminated"
)
)
If the problem is still not resolved, please let me know immediately, looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JorgePereira ,
According to your needs, you want to get a list of employees in the Active status by filtering different dates. I did the following test, which can be used as a reference: first obtain the maximum and minimum values of the date in the slicer, and then judge in the if condition. The mark that meets the condition is “Active”, and the one that is not satisfied is “Terminated”. Then put the measure into Filters to filter out the list of Active employees.
Cur_Status =
IF (
MAX ( [Termination Date] ) = BLANK (),
IF ( MAX ( [Hire Date] ) >= [First_Slicer_Date], "Active","Terminated" ),
IF (
MAX ( [Termination Date] ) <= [Second_Slicer_Date]
&& MAX ( [Hire Date] ) >= [First_Slicer_Date],
"Acitve",
"Terminated"
)
)
If the problem is still not resolved, please let me know immediately, looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
In the report tab, apply page level filter on the "Termination Date" field as "Is Blank", now you will have only the active employees on this report page.
Hire Date can be slicer for users to select and you can create list of active employee.
Hope above is making sense, let me know if this is what you are looking for, if not please provide more details.
Thanks for the help, but I need a list of active users on any date.
For example, if an employee was fired on 7/20/2017 and I choose the date of 7/19/2017, that employee should appear on the list because he was active on that date.
I think there can be multiple solution to this, try below:
Assuming for the Date you have a separate table which is coming to the slicer/filter for the selection, and also assuming that there will be single selection on the date.
--Create a measure
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
92 | |
87 | |
84 | |
65 | |
49 |
User | Count |
---|---|
140 | |
114 | |
110 | |
59 | |
59 |