Forum Discussion
shekhar_shres
5 years agoAdvocate II
Categorising a Column based on Row Count
Hi all, I hope all of you are having a great time. I need a help with Power Query. I have the following Column. I want to add a Category Column that depends on row as below. For exam...
- 5 years ago
Simply adding 1 would solve it
Table.AddColumn(Source, "Category", each "Category " & Number.ToText(Number.RoundDown(List.PositionOf(Source[ID],[ID])/3)+1))
shekhar_shres
5 years agoAdvocate II
It started from 0 instead of 1 when I used the code.
When I included Roundup, it came as follows:
We were close enough
Thankyou,
Jakinta
5 years agoSolution Sage
Simply adding 1 would solve it
Table.AddColumn(Source, "Category", each "Category " & Number.ToText(Number.RoundDown(List.PositionOf(Source[ID],[ID])/3)+1))