Forum Discussion
davidgaribaldi
6 years agoHelper I
Counting consecutive values
Hi I'm trying to count consecutive rows that match. I have an ID column, a date column, and then a value column. I'm sorting by the ID then the date and I'd like for it to tell me the length of t...
- 6 years ago
Hi davidgaribaldi,
You could try below measure to see whether it work or not
Measure 3 = VAR temp = CALCULATE ( COUNT ( t5[ID] ), FILTER ( ALLEXCEPT ( t5, t5[ID], t5[ Value] ), t5[ Date] <= MIN ( t5[ Date] ) ) ) RETURN IF ( CALCULATE ( COUNT ( t5[ Value] ), ALLEXCEPT ( t5, t5[ID], t5[ Value] ) ) > 1 && temp = 1, 0, temp )Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dax
6 years agoCommunity Support
Hi davidgaribaldi,
I don't understand the logic of your sample, so if possible, could you please expain this to me? Then I will help you more corretly.
Thanks for your understanding and support.
Best Regards,
Zoe Zhi