Forum Discussion
simrantuli
6 years agoContinued Contributor
Issues in Matrix visual
Hi All, I am facing an issue while trying to show some information in 'Matrix'. So, I have below two tables. 'Table' table: 'Mapping' table: What I want to show in 'Matrix'...
- 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.
Greg_Deckler
6 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.
simrantuli
6 years agoContinued Contributor
Thanks Greg_Deckler