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

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.

Reply
selected_
Helper IV
Helper IV

How do I calculate salary increase for employee

I have compensationHistories table that contain column like employeeid, date, salary. I wanna see how much % the increase was if an employee had salary increase compare to previous. I have tried different ways but can get it. someone please?

2 REPLIES 2
amitchandak
Super User
Super User

@selected_ , Please share some data fields to suggest. We can compare salary with last date salary and show increase

 

a measure using offset for last salary

 

Current = Sum(Table[Salary])

 

Prior =

Calculate(Sum(Table[Salary]), OFFSET ( -1,allselected(Table[Employee ID],Table[Date]), orderby(Table[Date]), ,partitionBy(Table[Employee ID])))

 

Change % = divide([Current]- [Prior], [Prior])

 

Continue to explore Power BI Offset Compare Categories, Time Intelligence MOM, QOQ, and YOY: https://youtu.be/5YMlkDNGr0U

hi,

thanks but i doesn't work, I only get back a 3 records while there are more employee who have increase salary.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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