Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Why this RELATED function does not work?

Hello   Can you tell me please why this formula does not work?     CALCULATE(COUNT(DifferentTable[Col1]),filter(DifferentTable,DifferentTable[Col2]=RELATED(SameTable[Col1])))     I get the ...
  • v-yingjl's avatar
    6 years ago

    Hi Anonymous ,

    Is there any relationship between these two tables? 

    If there is no relationship between them, you cannot use related() function. If they have a relationship actually, try to use relatedtable() function.

    Related() is used to refer to One side of a relationship. 

    RELATEDTABLE() refer to the many side.

    Please refer this article about related and relatedtable: Related and RelatedTable – DAX for Power Pivot, Power BI and SSAS 

     

    Best Regards,
    Yingjie Li

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.