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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello everyone,
I need help with this, I need to create a new column that sums row by row historically from a specific column i.e,
A / B
1 / 1
2 / 3
-1 / 2
-3 / -1
6 / 5
...
How can I get the column B from column A?
Solved! Go to Solution.
Hi @lonerwalker
You need to add a date column or index column to compare.
If you want compare by a index column, try this,
Then, use the measure to calculate the total
total =
var _ind=SELECTEDVALUE('Table'[Index])
return
CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Index]<=_ind))
Result:
OR
If you want compare by a Date column, try this,
total =
var _ind=SELECTEDVALUE('Table'[date])
return
CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[date]<=_ind))
Result:
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @lonerwalker
You need to add a date column or index column to compare.
If you want compare by a index column, try this,
Then, use the measure to calculate the total
total =
var _ind=SELECTEDVALUE('Table'[Index])
return
CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Index]<=_ind))
Result:
OR
If you want compare by a Date column, try this,
total =
var _ind=SELECTEDVALUE('Table'[date])
return
CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[date]<=_ind))
Result:
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@lonerwalker when you say historically, I am assuming there a date column in your data that you can be used to identify which transaction came first. In that case you can use @Greg_Deckler suggestion but replace the index column with your date column
@lonerwalker Well, you would want to add an Index column and then you could do something like the following:
B = SUMX(FILTER('Table',[Index] < EARLIER('Table'[Index])),[A])
@Greg_Deckler I tried your formula but return this, the column is called "Columna", "Fecha de entrega" is a date column and "evolucion de stock" is the column used to SUMX. Also, I Filter by product in "producto terminado" for see the data.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 47 | |
| 30 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 88 | |
| 72 | |
| 38 | |
| 26 | |
| 24 |