Forum Discussion

Dakotars's avatar
Dakotars
Frequent Visitor
8 years ago
Solved

Identifying latest status within a given year?

Hi there,   I have a calculated column with the following status fields: 1. Surveyed, 2. Interviewed, 3. Scheduled, 4. Eligible, and 5. Removed.    I'm having an issue where there are several dif...
  • v-caliao-msft's avatar
    v-caliao-msft
    8 years ago

    Dakotars,

     

    You can create a new table to get the last survey date for each client in the each year.

    Table = SUMMARIZE(Table1,Table1[Client Code],Table1[Survey status year],"LastDate",CALCULATE(MAX(Table1[Survey Month]),ALLEXCEPT(Table1,Table1[Client Code],Table1[Survey status year])))

     

     

    Then create a calculate column to get the status by using LOOKUPVALUE function.

    status = LOOKUPVALUE(Table1[Status for this year?],Table1[Client Code],'Table'[Client Code],Table1[Survey Month],'Table'[LastDate])

     

    Regards,

    Charlie Liao