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! It's time to submit your entry. Live now!
Hi,
Pls vide the following pic:
MarginRT is a calculated column in the product table. If we consider the first four lines in the product table ( highlighted in orange), the code of MarginRT (Margin Running Total ) may evaluates like following :
1 Margin RT =
2 VAR CurrentTotalMargins = 'Product'[TotalMargin] ==>> 51,459.16 (the fourth row of TotalMargin Column)
3 RETURN
4 SUMX(
5 FILTER( 'Product',
6 'Product'[TotalMargin] >= CurrentTotalMargin), ==>>here we tend to think that the total of first four rows i.e. 2,38,353.72 > = 51,459.16 ( the orange highlighted area in product table )
In row number 4 of the Product table, i.e. "A Datam SLR Camera", there happen four iterations caused by Filter function. At row number 4, we get four figures : 81856, 53464, 51574, 51459 and the total of the same comes to 238353 which is the result of the iteration caused by Filter.
Next, the comparison happens : 2,38,353.72 > = 51,459.16 and SUMX conducts the summation of the four aforesaid figures and returns : 238353.72 .
Pls let me know whether my understanding is correct or not.
Regards,
Somnath
Solved! Go to Solution.
Hi @somnath6309,
Yes, your understanding of how that MarginRT DAX calculated column works is absolutely correct and you’ve described the row-by-row evaluation behavior quite accurately.
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
Hi @somnath6309,
Yes, your understanding of how that MarginRT DAX calculated column works is absolutely correct and you’ve described the row-by-row evaluation behavior quite accurately.
Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.
@somnath6309 Something seems very off about that formula. First, that is not typically how you would write a running total. A running total typically needs something like an Index or Date to define "earlier" and "later". But, yes, the formula is going to create a running total of all rows whose TotalMargin is larger than the TotalMargin of the current line. To what end that is important, I am not certain.
| User | Count |
|---|---|
| 49 | |
| 37 | |
| 33 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 133 | |
| 99 | |
| 57 | |
| 38 | |
| 38 |