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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
eliasayyy
Memorable Member
Memorable Member

how to summarize table of employees until terminated

hello everyone a little complex question,

i have a table and heres a sample:

Id      Name       Position          Update Date     Transport Per Day     Pay Per Hour     Start Date    Terminated
1Person ATeam Leader10/1/202220710/1/2022 
1Person ATeam Leader12/1/2022209  
2Person BAgent10/1/202220510/1/2022 
2Person BAgent11/20/202200 Yes
3Person CAgent11/20/202220511/1/2022 

 

so i made on power query following formulas:

 

 

Add column
name: Today
formula = if [Terminated] = "Yes" then [Updated Date] else DateTime.LocalNow()

then 
Add column
name: new Date
formula = { Number.From([Update Date])..Number.From([Today]) }
press expand to new rows
change type of new Date to Date

 

 



this will create a continuous date from the date until today
so i will have now as result example:

Id     Name      Position        Update Date  Transport Per   DayPay Per Hour  Start Date  Terminated  Today          new Date    
1Person ATeam Leader10/1/202220710/1/2022 12/28/202210/1/2022
1Person ATeam Leader10/1/202220710/1/2022 12/28/202210/2/2022
1Person ATeam Leader10/1/202220710/1/2022 12/28/202210/3/2022
1Person ATeam Leader10/1/202220710/1/2022 12/28/202210/4/2022
 
1Person ATeam Leader10/1/2022209  12/28/202212/28/2022
1Person ATeam Leader12/1/2022209  12/28/202212/1/2022
1Person ATeam Leader12/1/2022209  12/28/202212/2/2022
1Person ATeam Leader12/1/2022209  12/28/202212/3/2022
1Person ATeam Leader12/1/2022209  12/28/202212/4/2022
1Person ATeam Leader12/1/2022209  12/28/202212/28/2022



now if you made the sample yourself,
you will see that Person B will have same effect of Person A as show above but i will have terminated Too
so the list will keep going on and will avoid terminated 

what can i do to create list of the employee from the updated date until the last updated date where terminated = "Yes"

so in sample i will have for peron B for the "Today" added column:

Id         Name             Position             Update Date        Transport Per Day        Pay Per Hour       Start Date       Terminated   Today     
1Person ATeam Leader10/1/202220710/1/2022 12/28/2022
1Person ATeam Leader12/1/2022209  12/29/2022
2Person BAgent10/1/202220510/1/2022 11/20/2022
2Person BAgent11/20/202200 Yes11/20/2022
3Person CAgent11/20/202220511/1/2022 12/28/2022



2 REPLIES 2
Anonymous
Not applicable

Hi @eliasayyy ,

What's your expected result? Do you want to get the employees who are terminated or something else? Could you please explain more details(specific examples, calculation logic or screenshot etc.) on it? It is better if you can share a simplified pbix file with the expected result explanation. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

amitchandak
Super User
Super User

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.