March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I'm doing the Mavern Analytics advanced DAX course & there is a example where we create a calculated column in the Fact/Lookup table for Customers to return total revenue (for all customers) from the Sales table Fact/Data table (this is being used as a input to a bigger calculation) into the Dimension/Lookup table
The calculation used is SUMX (see below) but would this not calculate the revenue per customer not all customers? Or is it because there has been no context transition (starting with row context & not used calculate) hence it is just doing the SUMX over every customer?
Thanks
Solved! Go to Solution.
The SUMX in the example would return the same amount for each customer, because it is iterating the entire fact table without regard to the relationship between Customers and Sales by Store. However, if you add RELATEDTABLE it will filter the fact table per the relationship with Customers:
SUMX (
RELATEDTABLE ( 'Sales by Store' ),
'Sales by Store'[quantity_sold] * 'Sales by Store'[unit_price]
)
Proud to be a Super User!
The SUMX in the example would return the same amount for each customer, because it is iterating the entire fact table without regard to the relationship between Customers and Sales by Store. However, if you add RELATEDTABLE it will filter the fact table per the relationship with Customers:
SUMX (
RELATEDTABLE ( 'Sales by Store' ),
'Sales by Store'[quantity_sold] * 'Sales by Store'[unit_price]
)
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |