Forum Discussion
Issues in Matrix visual
- 6 years ago
simrantuli - I did it like the following:
Measure = VAR __Key = MAX('Table'[#Key_Site_Supplier]) VAR __Site = MAX('Table (2)'[Site]) RETURN MAXX(FILTER('Table (2)',[#Key_Site_Supplier] = __Key && [Site] = __Site),[Supplier])PBIX is attached below sig.
Also, you could achieve this just using "First Supplier" if you make your relationship filter direction "Both". Then you don't need the DAX. But, if for some reason you can't do that in your model, the DAX should work.
simrantuli - I did it like the following:
Measure =
VAR __Key = MAX('Table'[#Key_Site_Supplier])
VAR __Site = MAX('Table (2)'[Site])
RETURN
MAXX(FILTER('Table (2)',[#Key_Site_Supplier] = __Key && [Site] = __Site),[Supplier])
PBIX is attached below sig.
Also, you could achieve this just using "First Supplier" if you make your relationship filter direction "Both". Then you don't need the DAX. But, if for some reason you can't do that in your model, the DAX should work.
Greg_Deckler You are AWESOME!
It worked. Thank you so much!
Just one question. Why doesn't the below measure work in this case? What's the issue? If you could explain.
SELECTEDVALUE(Mapping[Supplier])
Thanks!
- Greg_Deckler6 years agoCommunity Champion
simrantuli - I will have to test but off the top of my head, I would say it is because your relationship between your tables is not set to a filter direction of Both. You want 2 arrows pointing in each direction on your relationship. If not that it could be that SELECTEDVALUE is finding multiple items but in that case it would return blank by default I believe.
- simrantuli6 years agoContinued Contributor
Thanks Greg_Deckler