Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

highest number if positive values in a row

h12
8 - Asteroid

Hi all!

 

I have this data set:

 

Group

Value

12
23
34
4-9
5-10
63
74

 

And I would like to find out the largest number of positive values in a row. So based on the above, the answer would be 3 (group 1,2,3) as thats the longest streak with positive values. Ofcourse my entire data set is bigger so there will be a range of streaks but I would like to find the longest please.

 

Many thanks in advance!!

 

3 REPLIES 3
rzdodson
12 - Quasar

@h12 here is one way to do this:

 

Solution.png

ChrisTX
16 - Nebula
16 - Nebula

Another option attached

 

Screenshot 2023-12-04 095254.png

Chris

h12
8 - Asteroid

Thank you both! Exactly what I needed. I was getting stuck on how to identify the streak of positives, but the formula makes sense!

Labels
Top Solution Authors