Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
hello i have a table
say for initial month 1:
| Name | Pay | Previous Pay | Total Pay |
| A | 1000 | 1000 | |
| B | -2000 | -2000 | |
| C | -1000 | -1000 | |
| Total | -2000 | -2000 |
and if i select month 2:
| Name | Pay | Previous Pay | Total Pay |
| A | 500 | 1000 | 1500 |
| B | 3000 | -2000 | 1000 |
| C | 4000 | -1000 | 3000 |
| Total | 7500 | -2000 | 5500 |
measure is :
Pay = sum([pay])
previous pay = calculate([pay],previousmonth)
total pay = if([previous pay] < 0 ,[pay]+[previous pay],[pay])
when i do this measure, it only affects the negative numbers and i get this:
| Name | Pay | Previous Pay | Total Pay |
| A | 500 | 1000 | 500 |
| B | 3000 | -2000 | 1000 |
| C | 4000 | -1000 | 3000 |
| Total | 7500 | -2000 | 4500 |
so how can i say if total of [previous pay] < 0 then add previous with current pay
but this isnt my desired result:
my desired result is the thrid table which is this:
| Name | Pay | Previous Pay | Total Pay |
| A | 500 | 1000 | 1500 |
| B | 3000 | -2000 | 1000 |
| C | 4000 | -1000 | 3000 |
| Total | 7500 | -2000 | 5500 |
Solved! Go to Solution.
@Anonymous , change the measure like
total pay =
sumx(Values(Table[Name]), if([previous pay] < 0 ,[pay]+[previous pay],[pay]))
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |