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
Hi all! I am wanting to calculate a balance that will include the previous period's net change (Screenshot below), except for period one. Is this possible to do?
To add a little more information to my query: 'Net Change' in Period 1 is the Period 1 Balance. What I want to do is take the following Debits - Credit total plus the previous period 'Net Change' to get my balance through period 12.
Hi @cisrael ,
Please try to create a measure like below:
Measure =
var Balance_ = SUM('Table'[Debit])-SUM('Table'[Credit])
var Period_ = SELECTEDVALUE('Table'[Period ID])
var Debit_ = CALCULATE(SUM('Table'[Debit]),FILTER(ALLEXCEPT('Table','Table'[Account Number]),'Table'[Period ID] = Period_ -1))
var Credit_ = CALCULATE(SUM('Table'[Credit]),FILTER(ALLEXCEPT('Table','Table'[Account Number]),'Table'[Period ID] = Period_ -1))
return Balance_+Debit_-Credit_
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @V-lianl-msft - thank you very much for your response! I have transferred the suggested measure but I am not getting the correct numbers. I'm sure it is something I am doing wrong, below is the output:
@cisrael , a measure like
M1 = Sum(Table[Debits]) - sum(Table[Credit]) + CALCULATE(SUM(Table[Net Change]),previousmonth('Date'[Date]))
Same year =
CALCULATE(SUMX(Values('Date'[Month Year]), [M1] ),DATESYTD('Date'[Date],"12/31"))
Rolling 12
Rolling 12 = CALCULATE( SUMX(Values('Date'[Month Year]), [M1] ),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 134 | |
| 96 | |
| 78 | |
| 67 | |
| 65 |