Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 ID | Last day of the month | Last Increase | Monthly Total |
| 100 | 31/1/2022 | 1/8/2021 | 1000 |
| 100 | 28/2/2022 | 1/2/2022 | 1500 |
| 100 | 31/3/2022 | 1/2/2022 | 1500 |
| 200 | 31/1/2022 | 1/8/2021 | 1000 |
| 200 | 28/2/2022 | 1/2/2022 | 1500 |
| 200 | 31/3/2022 | 1/3/2022 | 1700 |
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 ID | Last day of the month | Last Increase | Monthly Total | Last % increase |
| 100 | 31/1/2022 | 1/8/2021 | 1000 | 0% |
| 100 | 28/2/2022 | 1/2/2022 | 1500 | 50% |
| 100 | 31/3/2022 | 1/2/2022 | 1500 | 50% |
| 200 | 31/1/2022 | 1/8/2021 | 1000 | 0% |
| 200 | 28/2/2022 | 1/2/2022 | 1500 | 50% |
| 200 | 31/3/2022 | 1/3/2022 | 1700 | 13% |
Thank you!!
Hi @Syndicate_Admin
Here is a sample file with the solution https://www.dropbox.com/t/VxePA5I71I36fxiz
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 )
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |