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

Multi row formula tool

shivraj_r
7 - Meteor

Hi All,

 

I'm trying to do a calculation using the multi row formula tool but for some reason I keep getting -1 as the output in the column! Logic is pretty straightforward.Anyone know why? Attaching screenshots here

 

image.pngimage.png

3 REPLIES 3
ponraj
13 - Pulsar

Here is the solution for your case. 

 

SampleDataSampleDataWorkflowWorkflowMultirowformulatoolMultirowformulatoolResultsResults

shivraj_r
7 - Meteor

@ponraj Thanks! Worked perfectly! On a sidenote - what was wrong with my logic? And is there a particular reason to use IIF over IF?

ponraj
13 - Pulsar

Same can be achieved using IF as well.  Here is the expression. 

 

IF [event_id]=="onProjectStateDetached"&&[Row-1:event_id]=="onProjectStateAttached" THEN [uptime]-[Row-1:uptime] ELSE 0 ENDIF

 

 

Labels
Top Solution Authors