Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
somnath6309
Helper I
Helper I

|| ABC Analysis ||

Hi,

Pls vide the following pic:

ABC Analysis.png

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

1 ACCEPTED SOLUTION
ajaybabuinturi
Memorable Member
Memorable Member

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.

View solution in original post

2 REPLIES 2
ajaybabuinturi
Memorable Member
Memorable Member

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.

GeraldGEmerick
Memorable Member
Memorable Member

@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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.