Forum Discussion
powerbityro
Helper II
6 years agoSUM ( RELATED () ) dont work
Hi all, i have the following calculation with SUM ( RELATED () ) which dont work: X = CALCULATE(SUM('Table1'[ABC]) / SUM(RELATED('Table2'[CDE])); ALLSELECTED('Table1'[EFG])) i have the e...
- Anonymous6 years ago
powerbityro
You cannot use related or relatedtable after SUM. Simply remove RELATED will work.
The correct way of using RELATED AND RELATEDTABLE is when you restrict you context to a table and you want referent column from another related table. e.g. Revenue = TableA[QTY] * RELATED(TableB[Sales Price])
RELATED/RELATEDTABLE: https://theexcelclub.com/dax-power-pivot-power-bi-ssas-related-and-relatedtable/Best,
Paul.
Greg_Deckler
Community Champion
6 years agoSee if SUMX meets your needs. Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490