Forum Discussion

Prakash1050's avatar
Prakash1050
Helper III
3 years ago
Solved

Need Dax Measure

Hi All,         I need DAX Measure for not creating relationship and get the answer.          I have 3 Tables A, B, C.         A table have BU, Composite and Key columns.         B table have Key...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Prakash1050 ,

    Please update the formula of measure as below and check if it can work even though filter the value of field [BU] or [Composite] field in the table A. 

    Measure = 
    VAR _selkeys =
        CALCULATETABLE (
            VALUES ( 'A'[Key] ),
            ALLSELECTED('A')
        )
    VAR _entitylist =
        CALCULATETABLE (
            VALUES ( 'B'[Entity ID] ),
            FILTER ( 'B', 'B'[Key] IN _selkeys )
        )
    RETURN
        CALCULATE ( SUM ( 'C'[Value] ), FILTER ( 'C', 'C'[Entity ID] IN _entitylist ) )

    Best Regards