Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
When making SUMX Measure ("Sales", "Sales Quantity"), the measure of SUMX ("Unit Price", SUMX ('Sales', [Sales Quantity]) and the measure of =SUMX ('Unit Price', [SUMX Measure]) are different. What is the difference between the measure and the formula?
In addition, SUMX ('Unit Price', SUMX ('Sales', Sales' [Sales Quantity]) and =SUMX ('Sales', [SUMX Measure]) show the number of rows in the Unit table and Sales table multiplied by [SUMX Measure] respectively, which is difficult to understand. Please explain.
Solved! Go to Solution.
Hey @Youngmyung ,
read this article carefully: https://mdxdax.blogspot.com/2011/03/logic-behind-magic-of-dax-cross-table.html
Jeffrey Wang is considered being one of the masterminds behind DAX, one of the many revelations of the article is what happens when there is a calculate:
Calculate function performs the following operations:
Please be aware that referencing a measure inside a DAX statements implicitely wraps a CALCULATE around it, performing the 4 steps of the CALCULATE.
A table iterator like SUMX creates a row context for the numeric expression, when referencing a measure in the <numeric expression> part of SUMX, the 4 steps are happening.
Next to this "general" explanation, I have my difficulties to provide more specific advise, explanation, because your question contains flaws:
Nested iterations like SUMX ("Unit Price", SUMX ('Sales', [Sales Quantity]) are difficult especially when there is no relationship between the two tables, without knowing the data model, it's difficult to explain what you consider being a multiplication. When there is a relationship, this might return a different result:
SUMX ("Unit Price", CALCULATE(SUMX ('Sales', [Sales Quantity])))
Be aware, that the snippet contains brackets that might be wrong.
Nevertheless, hopefully, this helps to tackle your challenge.
Regards,
Tom
Hey @Youngmyung ,
read this article carefully: https://mdxdax.blogspot.com/2011/03/logic-behind-magic-of-dax-cross-table.html
Jeffrey Wang is considered being one of the masterminds behind DAX, one of the many revelations of the article is what happens when there is a calculate:
Calculate function performs the following operations:
Please be aware that referencing a measure inside a DAX statements implicitely wraps a CALCULATE around it, performing the 4 steps of the CALCULATE.
A table iterator like SUMX creates a row context for the numeric expression, when referencing a measure in the <numeric expression> part of SUMX, the 4 steps are happening.
Next to this "general" explanation, I have my difficulties to provide more specific advise, explanation, because your question contains flaws:
Nested iterations like SUMX ("Unit Price", SUMX ('Sales', [Sales Quantity]) are difficult especially when there is no relationship between the two tables, without knowing the data model, it's difficult to explain what you consider being a multiplication. When there is a relationship, this might return a different result:
SUMX ("Unit Price", CALCULATE(SUMX ('Sales', [Sales Quantity])))
Be aware, that the snippet contains brackets that might be wrong.
Nevertheless, hopefully, this helps to tackle your challenge.
Regards,
Tom
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.