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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Calculate Percentage Last Increase

Hello!

I have the following information in the dataset. My datasets are distinguished from month to month by the "last day of the month" column.

Employee IDLast day of the monthLast IncreaseMonthly Total
10031/1/20221/8/20211000
10028/2/20221/2/20221500
10031/3/20221/2/20221500
20031/1/20221/8/20211000
20028/2/20221/2/20221500
20031/3/20221/3/20221700

I need to be able to calculate the % of the last increment of each employee ID and then put it in a table, is there a way to do it? The result I need to get would be as follows:

Employee IDLast day of the monthLast IncreaseMonthly TotalLast % increase
10031/1/20221/8/202110000%
10028/2/20221/2/2022150050%
10031/3/20221/2/2022150050%
20031/1/20221/8/202110000%
20028/2/20221/2/2022150050%
20031/3/20221/3/2022170013%

Thank you!!

1 REPLY 1
tamerj1
Super User
Super User

Hi @Syndicate_Admin 
Here is a sample file with the solution https://www.dropbox.com/t/VxePA5I71I36fxiz

1.png

Last % increase = 
VAR CurrentDate = Payroll[Last day of the month]
VAR CurrentSalary = Payroll[Monthly Total]
VAR CurrentEmployeeTable = CALCULATETABLE ( Payroll, ALLEXCEPT ( Payroll, Payroll[Employee ID] ) )
VAR DatesBeforeTable = FILTER ( CurrentEmployeeTable, Payroll[Last day of the month] < CurrentDate )
VAR PreviousDate = MAXX ( DatesBeforeTable, Payroll[Last day of the month] )
VAR PreviousSalay = MAXX ( FILTER ( DatesBeforeTable, Payroll[Last day of the month] = PreviousDate ), Payroll[Monthly Total] )
RETURN
    DIVIDE ( CurrentSalary - PreviousSalay, PreviousSalay, 0 )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.