We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Count consecutive number of columns having Values/Numbers in a row right to left.

Austin004lasrado
8 - Asteroid

 

Hello All,

I have requirement where I have to count number of columns which has a consecutive values(Stop at Null) this is monthly activity, which means, every month we will have a new column and formula should automatically consider that too. All these countable columns are number fields.

 

below is the data.

Sales Account01-03-202301-04-202301-05-202301-06-202301-07-2023CommentsStatus
ABC2773523.672422687.251527363.8921940.72320070IgnoreActive
DEF   6721623.6742191XYZActive
GHI     XYZInactive
JKL 54963.346336503.9697241804.459835480.9466XYZActive
MNO  83249.6127  XYZInactive
PQR254801.593620222.866   XYZInactive
STU61496.6072552791.264 215380.883746.769XYZActive
VWX122977.92811831.18   XYZInactive
YZ175610.5636 47653.1286  XYZInactive

 

I need a result like below.

Group Sales 01-03-202301-04-202301-05-202301-06-202301-07-2023CountCommentsStatus
ABC2773523.672422687.251527363.8921940.723200705IgnoreActive
DEF   6721623.67421912XYZActive
GHI     0XYZInactive
JKL 54963.346336503.9697241804.459835480.94664XYZActive
MNO  83249.6127  0XYZInactive
PQR254801.593620222.866   0XYZInactive
STU61496.6072552791.264 215380.883746.7692XYZActive
VWX122977.92811831.18   0XYZInactive
YZ175610.5636 47653.1286  0XYZInactive

 

 

3 REPLIES 3
Christina_H
14 - Magnetar

Try this

image.png

caltang
17 - Castor
17 - Castor

Similar to @Christina_H !

 

EDIT: Whoops, misread! You mentioned consecutive numbers - Missed that point! 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Austin004lasrado
8 - Asteroid

Hello @Christina_H  thank you so much, solution worked for me.

Labels
Top Solution Authors