Hi all,
I am trying to add a number column that restarts counting every time a new category starts.
Example:
Cat CustomColumn
A 1
A 2
A 3
B 1
B 2
B 3
C 1
C 2
C 3
In Excel, this is very easy, but in Power Query I have a hard time achieving this.
Any ideas?
Thanks,
Kirvis
Solved! Go to Solution.
Hi,
you can achieve this with the grouping function and then index it.
A nice Article about it is her.
https://www.excelguru.ca/blog/2018/06/27/number-rows-by-group-using-power-query/
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!
Hi,
you can achieve this with the grouping function and then index it.
A nice Article about it is her.
https://www.excelguru.ca/blog/2018/06/27/number-rows-by-group-using-power-query/
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!
Check out new user group experience and if you are a leader please create your group
100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.
User | Count |
---|---|
34 | |
34 | |
30 | |
11 | |
11 |
User | Count |
---|---|
60 | |
51 | |
42 | |
16 | |
14 |