Forum Discussion
AshleyJ17
2 years agoHelper II
How to add a cumulative count (running count) in Power Query
Hi Everyone, Looking for some help of which im sure will be a simple solution that i just can quite grasp, i have a table example below but essentially i want to add a Cumulative Count or Running...
- 2 years ago
You should be able to adapt the code I provided to preserve them.
One method
- duplicate the three columns you want to Group on
- Group on those columns
- Merge back with the original table
- Remove the duplicated columns
ToddChitt
2 years agoSuper User
Do you need this in DAX or Power Query?
In DAX, try the ROWNUMBER function: ROWNUMBER function (DAX) - DAX | Microsoft Learn
Pay attention to the PARTITION BY parameter as that will determine when the numbers 'start over'.
Or check this post:
Solved: How to add Row_number over partition by Customer -... - Microsoft Fabric Community
- AshleyJ172 years agoHelper II
Hey ToddChitt,
Thanks for reply, i do need this in Power Query, ill take a look at the post you shared and let you know how it goes