Forum Discussion
Count repeating values
- 3 years ago
Hi Anonymous ,
There should be a column that indicates which row comes before which. To do that, add an Index column in Power Query then create a calculation to identify whether a value in the current row is the same as the next row and vice versa. If what you are looking for is as below, the solution is in the attached pbix.
danextian I think I was not clear enough. I want to count the repeating values. So if the value occurs several times in a row then they must be counted. Otherwise it is just 1. In the example is for product 1 the value 2 times in a row, so the count will be two. The other products are just 1.
Hi Anonymous ,
There should be a column that indicates which row comes before which. To do that, add an Index column in Power Query then create a calculation to identify whether a value in the current row is the same as the next row and vice versa. If what you are looking for is as below, the solution is in the attached pbix.
- Anonymous3 years agoNot applicable
danextian Thanks a lot, this was what I needed!
- Anonymous3 years agoNot applicable
danextian I still have a question. In my data there is another index that should determine if it is a recurring value and that is a name. So when INDEX 1 and NAME 1 has the value 20 and then INDEX 2 and NAME 1 has the value 20 then it is repeating. How can I accomplish this?