Forum Discussion
Show right value from Dim Table
- 3 years ago
Hi andhiii079845
Please tryTitle = MAXX ( Fact, RELATED ( Dim[Title] ) )
The problem is that names have multiple titles - both Meier and Schulz have both Master and Bachelor as titles, so Power BI is choosing the first in alphabetical order. One possible solution would be to add a new column to the dim table to use as the sort order for the title. You could do this in Power Query as a conditional column, or you could add a column using DAX like
Title sort order =
SWITCH ( TRUE (), 'Table'[title] = "Master", 1, 'Table'[title] = "Bachelor", 2 )
and then set this as the sort order column for the title column
Thank you for your reply. It is only the case that the ID 1 and 4 have the same Name. I thinking about to filter the visual via a measure. My ideas was to calculated for the ID in the Dim Table the countrows of the fact table and use the measure in "Filters" (greater than 0). But I was not able to write the code for it.
- johnt753 years ago
Super User
Not sure if it will work as a filter in the way that you want but the measure would be
Num facts = COUNTROWS('Fact')