Forum Discussion
iluvcoding_91
Helper I
4 years agoDAX 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 ...
- 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], ", ")
iluvcoding_91
Helper I
4 years agoThanks, but that didn't work b/c the columns in the matrix are measure and not actual columns in the data model. Is there another function I can use instead of selectedvalues?
johnt75
Super User
4 years agoJust use [Cost of living] instead of the column reference. The measures should each be calculated in the correct context from the matrix visual, so it should work
- iluvcoding_914 years ago
Helper I
Thank you so much!!! That worked!!