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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.