Forum Discussion

iluvcoding_91's avatar
4 years ago
Solved

DAX code to select 3 minimum values across matrix row, then return a concatenation of said values

Hello, thank you all for taking the time to reply to my post. I am looking for help in writing a DAX code which iterates through a matrix row and selects the top three minimum values, then returns a ...
  • johnt75's avatar
    johnt75
    4 years ago

    Create a new measure as

    Minimum Three =
    var tmpTable = { ( "Cost of living", SELECTEDVALUE('Table'[Cost of living])), 
    ( "Housing", SELECTEDVALUE('Table'[Housing]))
    ... etc
    }
    return CONCATENATEX( TOPN( 3, tmpTable, [Value2], ASC), [Value1], ", ")