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.

multi row formula help

ManuelRodrigues
8 - Asteroid

Hi All,

 

I have a multi row formula problem. I have the data in this format:

ManuelRodrigues_0-1760458388801.png

 

I then used a sort tool to get all the same PO numbers with the same values to check missing fields in vendor name and vendor number. I then used a multirow formula but when i write the formula it says the function is malformed.

 

IF [PO Number] = [Row-1:PO Number] THEN
IIF(ISNULL([Vendor Name]) OR [Vendor Name] = "", [Row-1:Vendor Name], [Vendor Name]),
IIF(ISNULL([Vendor Number]) OR [Vendor Number] = "", [Row-1:Vendor Number], [Vendor Number])
ELSE
[Vendor Name],
[Vendor Number]
ENDIF

 

could I pls ask if you can help with the formula and where i am going wrong?

4 REPLIES 4
dreldrel
8 - Asteroid

My first impression is that you have multiple IF statements in your syntax, as well as two values after ELSE. You need to put all your conditions between IF and THEN 

alexnajm
18 - Pollux
18 - Pollux

If you are looking for the row below, you need Row+1 instead of Row-1

 

Or if you sort it differently where the value can cascade down, then your Formula should work, although I can't confirm - if you can post data that would be helpful

MinhLO
6 - Meteoroid

@ManuelRodrigues 
Your IF is wrongly created. From what I understand you are trying to apply a formulation on two different fields (Vendor Name , Vendor Number) in the same multi-row formula. Will not work.

I would advise to have 2 consecutive multi row formula. 1 for each field

As per documentation:

MinhLO_0-1760517082591.png

 

alexnajm
18 - Pollux
18 - Pollux

Great call as well @MinhLO 

Labels
Top Solution Authors