Forum Discussion
CliffordAP
4 years agoHelper II
Power Query - Custom Column tracking when the value of another column changes
Hello all! I have a small question. Is there a way I can create a custom column that will numerically add 1 each time the value of another column changes? A A A B B C A A ...
- Anonymous4 years ago
You can first sort like you have it, then Table.Buffer, then Group By Column1 and add an All Rows aggregation--but then go back to that step and add the optional parameter GroupKind.Local.
From there, you can add an index column starting at 1. Then Remove the columns except the table column and the index column. Now expand the table column, and you are all set.
--Nate
CliffordAP
4 years agoHelper II
This worked! To clarify for others, I did not sort the list at the start but kept it at the same order (The wording confused me a bit). I will study this further to understand it better, but following the steps you provided pulled it off perfectly!
Thank you so much!