Forum Discussion

yogeshk77's avatar
yogeshk77
Helper I
4 years ago
Solved

Get Second highest value

I have following tables Build table with Code Coverage   Mapping table - Work Item ID & Build ID And Work Item table     Now, I have a measure that gives me the latest Build ...
  • ValtteriN's avatar
    4 years ago

    Hi,

    You can create a measure with the following logic:

    Start data:


    Dax:

    Second latest build =
    var latest = MAX('Matrix example'[Company]) return
    CALCULATE(MAX('Matrix example'[Company]),'Matrix example'[Company]<>latest) //Exclude the latest from MAX
    End result:

    I hope this helps and if it does consider accepting this as a solutio nand giving the post a thumbs up!