Forum Discussion
Create index column based on criteria (Power Query)
- 1 year ago
Hello BalazsNy
Group By Product ID (in Power Query).
Operation for All Rows.
After grouping, add a Custom Column with the formula
=Table.AddIndexColumn(_, "Wished index outcome", 1, 1, Int64.Type)
Expand the resulting tables to flatten the data back out.
Thanks,
Pankaj Namekar | LinkedInIf this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hello BalazsNy
Group By Product ID (in Power Query).
Operation for All Rows.
After grouping, add a Custom Column with the formula
=Table.AddIndexColumn(_, "Wished index outcome", 1, 1, Int64.Type)
Expand the resulting tables to flatten the data back out.
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
hi pankajnamekar25
Thanks for the tip, but it is only half-solution as this indexing process does not take into account the cronological order of date column and resulting this:
- BalazsNy1 year agoHelper I
Meanwhile, I managed to solve by sorting based on product ID & date at first before grouping.