Forum Discussion

MattNino's avatar
MattNino
New Member
2 years ago
Solved

Pull latest Report by Date

Hello,

I am trying to figure out how to acheive the following. I have googled and tried several different measures but so far not successful


I have a table named Project Status with the following fields (there are more but this  is an example)

 

ProjectHealthScope HealthStatus Date
Project AGreenGreen8/1/2024
Project ARedGreen8/8/2024
Project AYellowYellow8/15/2024
Project BGreenGreen8/8/2024
Project BRedRed8/15/2024
Project CGreenGreen8/15/2024

 

 

I would like to pull the latest report based on the status date field and return all fields in the row. Measures I have tried have pulled The latest for each health, but I just wanted the latest report.

Expected Output

 

ProjectHealthScope HealthStatus Date
Project AYellowYellow8/15/2024
Project BRedRed8/15/2024
Project CGreenGreen8/15/2024
  • You can simply aggregate the date by latest, but DAX is needed to get the latest health text:

    Last Health = CALCULATE(MAX('Table'[Health]), LASTDATE('Table'[Status Date]))

    You can check my setup below:

     

3 Replies

  • You can simply aggregate the date by latest, but DAX is needed to get the latest health text:

    Last Health = CALCULATE(MAX('Table'[Health]), LASTDATE('Table'[Status Date]))

    You can check my setup below:

     

    • MattNino's avatar
      MattNino
      New Member

      hey thank you for the reply. Using that code I get an error - A single value for column "Health" in table project status cannot be  determined.

      Also will this bring in additional fields? Example, I have scope health, budget health, schedule health

  • actually that worked, I typed something wrong. THank you so much!