Forum Discussion

WannaBe's avatar
WannaBe
Frequent Visitor
2 years ago
Solved

How to flag oldest data by group

Hello, I am trying to identify (include / exclude) with a flag some Email by grouping them by Email and date. Only the oldest entries by Email, need to be Exclude. Here an exemple of what I need. ...
  • Greg_Deckler's avatar
    Greg_Deckler
    2 years ago

    WannaBe I just went with the names of the columns you showed in your sample data. If your column is named something else you will have to adjust. Alternatively, perhaps the actual steps will help. Get all of your transformations done that you want to clean up your data. Then do the following:

    1. Select Group By in the ribbon of the Home tab. Turn on Advanced. Group by Email column. Create an aggregation that returns the Minimum of Date. Create another aggregation that returns all rows.
    2. Expand the column that contains all rows except uncheck email column and turn off "Use original column name as prefix"
    3. Add a conditional column where if the minimum data aggregation column and the data column are equal to one another then return "Exclude" else return "Include"