Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Count repeating values

Hi, I have for example the following data: Product Values 1 20 1 20 2 15 3 10 1 5 I want to count how many times the value 20 returns in a row. So, for this case it will ...
  • danextian's avatar
    danextian
    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.