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 moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register 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.
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 32 | |
| 27 | |
| 25 |