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,
Quick question. I'm trying to create a measure that provides the starting number based off the ending number of the prior month. I can get it to work for the grand total but not at the row level.
Any help would be appreciated.
This is what I'm hoping to acheive:
| January | February | |||||
| Name | Start | Adj | Ending | Start | Adj | Ending |
| A | 19 | 19 | 19 | -3 | 16 | |
| B | 11 | 11 | 11 | 11 | ||
| C | 23 | 23 | 23 | 1 | 24 | |
| D | 91 | 2 | 93 | 93 | 93 | |
| E | 12 | 12 | 12 | 12 | ||
| F | 3 | 3 | 3 | 3 | ||
| G | 87 | 87 | 87 | 87 | ||
| H | 24 | 24 | 24 | 24 | ||
| I | 103 | -25 | 78 | 78 | 78 | |
| J | 12 | 12 | 12 | 12 | ||
| Total | 385 | -23 | 362 | 362 | -2 | 360 |
This is what I'm getting:
| January | February | |||||
| Name | Start | Adj | Ending | Start | Adj | Ending |
| A | 19 | 19 | 0 | -3 | 16 | |
| B | 11 | 11 | 0 | 11 | ||
| C | 23 | 23 | 0 | 1 | 24 | |
| D | 91 | 2 | 93 | 93 | 93 | |
| E | 12 | 12 | 0 | 12 | ||
| F | 3 | 3 | 0 | 3 | ||
| G | 87 | 87 | 0 | 87 | ||
| H | 24 | 24 | 0 | 24 | ||
| I | 103 | -25 | 78 | 78 | 78 | |
| J | 12 | 12 | 0 | 12 | ||
| Total | 385 | -23 | 362 | 362 | -2 | 360 |
Solved! Go to Solution.
Hi @jgiles ,
Please try:
Add a new column MonthNumber:
Then apply the measure to a matrix visual:
Start' =
var _a = CALCULATE(SUM('Table'[Adj]),FILTER(ALLEXCEPT('Table','Table'[Name]),[MonthNumber]=MAX('Table'[MonthNumber])-1))
return IF(ISBLANK(_a)&&MAX('Table'[MonthNumber])<>1,0,SUM('Table'[Start]))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @jgiles ,
Please try:
Add a new column MonthNumber:
Then apply the measure to a matrix visual:
Start' =
var _a = CALCULATE(SUM('Table'[Adj]),FILTER(ALLEXCEPT('Table','Table'[Name]),[MonthNumber]=MAX('Table'[MonthNumber])-1))
return IF(ISBLANK(_a)&&MAX('Table'[MonthNumber])<>1,0,SUM('Table'[Start]))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 102 | |
| 67 | |
| 65 | |
| 56 |