I'm struggling with an issue where I'm trying to use TopN in a measure but the order specified (asc/desc) doesn’t turn out right. Example:
CONCATENATEX (
topn( 5,
all( 'Table'[Column] ),
calculate( COUNT( 'Table'[Column]) ),
desc
),
'Table'[Column],
unichar(10)
)
The measure outputs the right counted col values (5 most frequently occurring) but in a backwards order (asc vs desc) and it wont let me fix it even though I’ve tried a bunch of different methods including RANKX.
Similar questions:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/DAX-Measure-Sort-by-issue/td-p/1116147