Forum Discussion
rjg2g11
8 years agoAdvocate I
Minimum Value across multiple columns
Hello, I am trying to create a column that picks out the minimum value from a number of columns. I have posted a table below with my desired outcome Can someone advise? Many Thank...
- 8 years ago
After unpivoting your Letter Columns, you can use following MEASURE to get the desired Output
DesiredResult = VAR MinValue = CALCULATE ( MIN ( TableName[Value] ), TableName[Value] <> 0 ) RETURN CONCATENATEX ( FILTER ( TableName, TableName[Value] = MinValue ), TableName[Attribute], ", " )
Greg_Deckler
8 years agoCommunity Champion
Easiest thing to do would be to unpivot your letter columns. At that point, the problem is trivial.
wilson_smyth
8 years agoPost Patron
make sure to specify that you dont care about zeros, as in your dataset, the lowest value is zero, even though its your outcome in the sample data specifies you want the lowest value that is greater than zero.
- Zubair_Muhammad8 years agoCommunity Champion
After unpivoting your Letter Columns, you can use following MEASURE to get the desired Output
DesiredResult = VAR MinValue = CALCULATE ( MIN ( TableName[Value] ), TableName[Value] <> 0 ) RETURN CONCATENATEX ( FILTER ( TableName, TableName[Value] = MinValue ), TableName[Attribute], ", " )- Zubair_Muhammad8 years agoCommunity Champion