Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Show another value based on measure

Hi,

I have the following measure to calculate the youngest driver who has won a Grand Prix:

YoungestDriver = CALCULATE(Max(drivers[dob]),FILTER(results, results[rc_position] = 1))
 
The outcome is the date of the driver, however I want the driver's name, which is in table 'Driver' and column 'Name'. How can I achieve this?
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    Please have a try.

    YoungestDriverName =
    CALCULATE (
        LOOKUPVALUE ( drivers[name], drivers[dob], MAX ( drivers[dob] ) ),
        FILTER ( results, results[rc_position] = 1 )
    )
    

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Please have a try.

    YoungestDriverName =
    CALCULATE (
        LOOKUPVALUE ( drivers[name], drivers[dob], MAX ( drivers[dob] ) ),
        FILTER ( results, results[rc_position] = 1 )
    )
    

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous This is perfect, thanks so much!