Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Find second Min value

Hi have a table like below 



I need to find the Min value for each day. however, all days have 0 in it and min(latency) will give 0 for all day.

But i want to show the next min value. For example : 32 for 13-04-20 & 5 for 14-04-20.

 

Please help me how i can achieve this.

  • Anonymous try this measure

     

    Min Value = 
    CALCULATE ( MIN ( Table[Latency] ), ALLEXCEPT ( Table, Table[Date] ), Table[Latency] > 0 )

     

    I would 💖 Kudos 🙂 if my solution helped. ?

3 Replies

  • Anonymous try this measure

     

    Min Value = 
    CALCULATE ( MIN ( Table[Latency] ), ALLEXCEPT ( Table, Table[Date] ), Table[Latency] > 0 )

     

    I would 💖 Kudos 🙂 if my solution helped. ?

    • Anonymous's avatar
      Anonymous
      Not applicable

      I figured that the below also works

      2ndMinDate =
      CALCULATE(MIN(table[Latency]),
      filter('table','table'[Latency]<>MIN('table'[Latency])))
      • parry2k's avatar
        parry2k
        Super User

        Anonymous you want to avoid using FiLTER function as it can be very expensive on larger datasets. Cheers!