Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am referring to the RELATEDTABLE example in https://docs.microsoft.com/en-us/dax/relatedtable-function-dax
Internet Sales = SUMX( RELATEDTABLE('InternetSales_USD') , [SalesAmount_USD])
Since the 'Product Category' table is linked to 'InternetSales_USD' table in a relationship (1 to many), I found that the following DAX would return the same result as the above:
Internet Sales = SUM( 'InternetSales_USD' [SalesAmount_USD])
What is the point of having RELATEDTABLE when the same result could be obtained without it? I know that Tableau does not require explicit command such as RELATEDTABLE to retrieve data from another joined table. You can simply define the relationship (with correct cardinality) and the program would pull the related data for you without any problem.
Thanks
Solved! Go to Solution.
Hi @tiptran
Measures will implicitly apply a CALCULATE around every statement, so if you create a Measure
Measure = SUM( sales[Sales Amt] )
in reality, this will be
Measure = CALCULATE( SUM( sales[Sales Amt] ) )
and CALCULATE performs context transition so RELATEDTABLE is not necessary.
Please read the link that you have posted explaining RELATEDTABLE and the one that I have and you should be able to understand.
Hi @tiptran
If you are creating Measure then the result would be the same, however, it would differ when creating a Column, in such scenario RELATEDTABLE or CALCULATE is necessary to preform context transition.
https://www.sqlbi.com/articles/understanding-context-transition/
Thank you, Mariusz. Could you explain why the result is the same if the following formula is used to create a measure and it differs for a new column?
Internet Sales = SUM( 'InternetSales_USD' [SalesAmount_USD])
I am guessing that:
Am I right?
Thanks again
Hi @tiptran
Measures will implicitly apply a CALCULATE around every statement, so if you create a Measure
Measure = SUM( sales[Sales Amt] )
in reality, this will be
Measure = CALCULATE( SUM( sales[Sales Amt] ) )
and CALCULATE performs context transition so RELATEDTABLE is not necessary.
Please read the link that you have posted explaining RELATEDTABLE and the one that I have and you should be able to understand.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
9 |