Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Temp table with Max Values

Hi

I've a data that consists of entries similar tot he below

Full NameTrainingSummaryTrainingDate
Elizabith SmithNot Started1/1/2021
Smith AustinPartial17/8/2021
Jacob BrownPartial3/1/2021
Joh DoeNot Registered3/4/2021
Joh DoePartial3/6/2021
Elizabith SmithComplete30/1/2021
Jacob BrownComplete5/2/2021
Marlene JacobPartial5/5/2021
Marlene JacobNot Started8/9/2021

 

 

I would like to create a table from this data set that will contain ONLY the latest information for each user (as follows):

 

Full NameTrainingSummaryTrainingDate
Elizabith SmithComplete30/1/2021
Jacob BrownComplete5/2/2021
Joh DoePartial3/6/2021
Marlene JacobNot Started8/9/2021
Smith AustinPartial17/8/2021

 

I will use this table later to report against (e.g. how many has complete training, Partial and not Started). But all should be based on latest status.

 

Thanks in advance

 

  • Anonymous You still need Lookup Min/Max:

    Table 2 =
      VAR __Table = 
        ADDCOLUMNS(
          SUMMARIZE('Table',[Full Name],"TrainingDate",MAX([TrainingDate])),
          "TrainingSummary",MAXX(FILTER('Table',[Full Name]=EARLIER([Full Name]) && [TrainingDate]=EARLIER([TrainingDate])),[TrainingSummary])
        )
    RETURN
      __Table

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks Greg_Deckler  for your reply. Maybe I used the wrong word. I don't want to create temp table but calculated table that contains information the way I described so that I can report against it.

       

      I went to the link you shared but I thought maybe when I mentioned temp table I confuses the question 

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Anonymous You still need Lookup Min/Max:

        Table 2 =
          VAR __Table = 
            ADDCOLUMNS(
              SUMMARIZE('Table',[Full Name],"TrainingDate",MAX([TrainingDate])),
              "TrainingSummary",MAXX(FILTER('Table',[Full Name]=EARLIER([Full Name]) && [TrainingDate]=EARLIER([TrainingDate])),[TrainingSummary])
            )
        RETURN
          __Table