Forum Discussion

joshua1990's avatar
joshua1990
Post Prodigy
1 year ago
Solved

Group value per article by MIN Date

Hi community!

I have a table like this

ArticleDepartmentCountryGroupDate
AA1A1AA1AA01.01.2023

 

Since there are multiple values for the same Article I would like to get only the first one.

How would you do that?

Using Group by? If so, how?

  • joshua1990 Like this:

    This is the M code generated:

    #"Grouped Rows" = Table.Group(#"Changed Type", {"Article", "Department", "Country", "Group"}, {{"Date", each List.Min([Date]), type nullable date}})

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    joshua1990 Like this:

    This is the M code generated:

    #"Grouped Rows" = Table.Group(#"Changed Type", {"Article", "Department", "Country", "Group"}, {{"Date", each List.Min([Date]), type nullable date}})