Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Saad_Hanif456
Helper I
Helper I

Leavers

Dear Experts,

 

I am stuck in the challenging situation.

 

Have a payroll data for all the months and years in one sheet but there is not any column Active / Nonactive staff.
How can i identify/filter employees ( the entire row of the staff) left till to date by Emp ID which is unique.

 

Please suggest anyone who have an idea of performing it

 

Following is the sample data for helping me in this regards.

 

Payroll DateEmp IDName Department
01-10-2210022Sajid Sales
01-10-2210023ImranSales
01-10-2210024AliSales
01-10-2210025AbidMarketing
01-10-2210026RomailMarketing
01-10-2210027UmarFinance
01-11-2210022Sajid Sales
01-11-2210028RehanSales
01-11-2210024AliSales
01-11-2210025AbidMarketing
01-11-2210026RomailMarketing
01-11-2210027UmarFinance
01-12-2210022Sajid Sales
01-12-2210028RehanSales
01-12-2210024AliSales
01-12-2210025AbidMarketing
01-12-2210029KashanMarketing
01-12-2210027UmarFinance

 

Note: Employees highlighted in the Yellow color is left from the Company in the respective month

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

Simple enough, WINDOW functions do the trick more easily than Time Intelligence functions in such a scenario.

ThxAlot_0-1696428141137.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

Simple enough, WINDOW functions do the trick more easily than Time Intelligence functions in such a scenario.

ThxAlot_0-1696428141137.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



@ThxAlot, Level.. Thank you so much

AntrikshSharma
Super User
Super User

@Saad_Hanif456 If you don't know who left and there is no column indicating that then how can we/DAX identify who left? Instead of spending time on this go back to your client/DBA and push them to add a column for Exit date, this is a very basic information, they must maintain it.

@AntrikshSharmaThank you for the response, cannot we find with the employee id since it is unique for every employees?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.