Forum Discussion

tomknight's avatar
tomknight
Icon for Helper I rankHelper I
7 years ago
Solved

Averages across linked tables

Hi,   I have the data model below and am trying to get an average of Placements[Amount] for each combination of 'Location Ratings'[Domain] and 'Location Ratings'[Latest Rating]   If I put Domain ...
  • avanderschilden's avatar
    7 years ago

    Hi Tom,

     

    Your model is completely fine.

     

    DAX is not able to pass a filter from [Location Ratings] to [Locations] because of the filter direction. That is where the problem occurs. 

     

    You need to activate bidirectional filtering between those two tables in your measure.

     

    I think this will do the job;

     

    Avg Amount =
    CALCULATE(
    AVERAGE(Placements[Amount]),
    CROSSFILTER('Location Ratings'[Location ID],Locations[Location ID],Both)
    )
     
    Let me know!
     
    Adrian