Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More

Using Multi Row Formula to return larger between active and row +1


Hi All,


I am not sure if this has been answered else where but I have not been able to locate it through my searches on the community page. I have data that is presented in a waterfall effect. The total of all data is at the top of the house and then each subsequent row will contain the building blocks of that total. I am trying to use the multi row formula to compare 2 rows ( active and row +1) to determine which of the 2 rows has a larger number. I think my logic is faulty as it is not returning the correct results. I have provided an example of the excel file data which shows the waterfall and the formua results for the same if logic, and  also the logic for the multi row formula. Thanks for your help

Excel file example.pngif logic.pngbf


Alteryx Certified Partner
Alteryx Certified Partner

Can you share some sample data.


I imagine the trailing spaces may cause a problem here. I recommend creating a copy of your account field and then using a data cleanse to strip out the leading space.


Then perform this calc. Without the data it's hard to see why your calculation may not work.



Alteryx Partner

I've slightly modified your formula to instead look at the length of the digit, instead of its actual value.


Let me know if this wouldn't work for some other reason not present in this sample data, but otherwise it seems to produce your desired result.




EDIT: But I do agree with the above poster, you'll need to remove trailing and leading whitespace for this to work. You could create a new field which does this using the Formula tool with NewField = [ACCOUNT], and then just strip the white space from NewField, do the computation on that, and drop it afterwards so you still have the waterfall-like effect in your workbook.


Thank you! Adjusting for the length worked. I had done a cleanse but I don't think it worked so I took your suggestion and created a formula copying the data from the account field, which also helped. 

Alteryx Partner

No problem!


If my answer (or BenMoss') helped, please accept one (or both!) as the solution so that others with similar questions can find an answer. (: