Hello Power BI Community,
Happy New Year to all!
I am trying to get a solution for a peculiar request. I am populating a measure in matrix to get a skyline chart.
My DAX measure is as follows:
var Rank = SELECTEDVALUE( Skyline[Rows] )
var Count = DISTINCTCOUNT( Table1[Name] )
var stage = SELECTEDVALUE(Table1[Stages])
NOT ISBLANK ( Rank ),
Rank <= Count,
TOPN ( Rank, VALUES(Table1[Name]),Table1[Name],ASC)
Now, this is all fine and the values in matrix are sorted based on the alphabetical order of the Table1[Name], but I need to sort based on a different column. I highlighted the part where I need to sort based on a different column eg: Table1[Price].
I tried multiple functions like SELECTCOLUMN, RANKX, etc.. but did not succeed.
I am including the source and PBIX file