Forum Discussion
Averages across linked tables
- 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
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;
- tomknight7 years ago
Helper I
Thank you so much Adrian - I tried everything to get that to work and it was pretty simple in the end!
I did turn bi-directional filters on the join between Location Ratings and Locations briefly to see if that would work but it didn't (although I may have done something differently there as well). I put it back because I have seen enough warnings about the potential impact of bi-directional filters in your model to put me off!
Is that DAX effectively turinng that relationship into a bi-directional filter but just for that measure only?
Thanks again for the help - it's much appreciated.
Tom
- avanderschilden7 years ago
Resolver I
Yes, it only activates bidirectional during the execution of the measure so you can keep it single in your model.