Forum Discussion

Creative_tree88's avatar
1 year ago
Solved

Lookup latest date, but dealing with multiple values

Hi - I have the attached data.  The data on left represents the source data (shaded yellow), and the data to the right (shaded all blue) represents the desired result using some form of lookup.   I...
  • vanessafvg's avatar
    1 year ago

     

    Last Valid Weight =
    VAR lastdte =
    CALCULATE (
    MAX ( CustomerWeight[Measure Date] ),
    NOT ( ISBLANK ( CustomerWeight[Weight] ) )
    )
    VAR result =
    CALCULATE (
    MAX ( CustomerWeight[Weight] ),
    CustomerWeight[Measure Date] = lastdte
    )
    RETURN
    IF ( result = 0, "No Height Listed", result )