Forum Discussion

lundande's avatar
lundande
Frequent Visitor
7 years ago
Solved

Return a column header based on the rows minimum value

I am new to PowerBI... I am struggling to figure out a way to return a column header based on the minimum value within that row. Can anyone help me with this?     Apple Pear Grape   Minimum ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi lundande 
    For the minimum column.

    1. Go to Edit Queries > Add column menu item > Statistics (Minimum).

    For the second part

    1. Then Choose all columns but the minimum and under transform menu item click unpivot selected columns.
    2. Create a visual table. Add a column that returns the minimum fruit name
    Returned Value = IF(Fruits[Minimum] = Fruits[Value],Fruits[Attribute],"N/A")
    Then you can filter the table, depends on your needs. Here I filtered out N/A

    Good luck!