Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I am trying to Summarize a Table and calculate running total in a new Table
As you can see in the attached pictures, the TempTable (1st Picture) with its DAX codes
and when I try to SUMX the Column "Summary" from TempTabel to my result table its not workig at row level, I want to add up only if the values in [Order] is less than or equal to the row value in my result table [PnL_Order], somthing similar to a running total.
Any help is appreciated.
Solved! Go to Solution.
Please try it with this change
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
not the best but maybe quickest solution
var result =
summarize(pnl, [Pnl_Order], "Amount1",
var _curOrder = MAX ([Pnl_Order])
RETURN
CALCULATE(SUMX(temptable, [Summary]), temptable[Order] <= _curOrder )
I cannot use "temptable[Order]" its coming from VAR above, so instead I tried to use it inside a FILTER and the result is same:
Please try it with this change
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Do you have any thoughts about why the same concept would not give me a result in all rows, when I use it in a Measure instead of a Table
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 32 | |
| 27 | |
| 26 |