Forum Discussion

bullius's avatar
bullius
Helper V
8 years ago
Solved

EARLIER function in M/Query Editor

Hi   I have data that looks like this:   ID Name 1 Apple 1 Banana 2 Orange 3 Pear 4 Pineapple 4 Grape 4 Mango 5 Peach   I want it to look like this:   ...
  • Interkoubess's avatar
    Interkoubess
    8 years ago

    HI bullius,

     

    Yes it is possible to do that in M.

    To sum up group by your id and add an index.

    You can add this code into your steps: 

    #"Grouped Rows" = Table.Group(#"Promoted Headers", {"ID"}, {{"Count", each  Table.AddIndexColumn(_, "Index", 1, 1), type table}})

     

    Hope it helps...

     

    Ninter