Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Multi-row conditional syntax problem

creily
8 - Asteroid

Hello,

I am new to Alteryx and this question seems basic for my genetic analysis. I need to compare current cell_id row value to cell_id next value, and if equal, add the next umi row value to a new column on the same row, if not equal, return 0. As you can see from the output, the conditional always returns as not equal. I've tried a couple different variations. See workflow attached:

 

biological_sample cell_id gene_name umi dual_expressor
1904_170_ctrl          1          IGHA1      11          0
1904_170_ctrl          3          IGHA1      14          0
1904_170_ctrl          4          IGHA1      16          0
1904_170_ctrl          5          JCHAIN     9           0
1904_170_ctrl          6          IGHA1       1           0
1904_170_ctrl          6          JCHAIN     5           0
1904_170_ctrl          7          IGHA1       1           0
1904_170_ctrl          7         JCHAIN      171       0

3 REPLIES 3
Claje
14 - Magnetar

Hi,

I think the issue with your current workflow is that you are grouping by the gene_name and umi columns in your multi-row formula.  If you remove these groups I think that it works as expected.

 

The problem here is that the gene_name changes even in the same cell_id, and each row has its own unique umi, so these group bys essentially cause subgroups to exist in your data that never have the same cell_id.

DavidP
17 - Castor
17 - Castor

Uncheck the group by fields in your multi row formula

 

multi row.png

creily
8 - Asteroid

Thanks! That worked perfectly. Still not sure why though.

Labels