Forum Discussion

powerbityro's avatar
powerbityro
Icon for Helper II rankHelper II
6 years ago
Solved

SUM ( 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...
  • Anonymous's avatar
    Anonymous
    6 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.