Free Trial

Alteryx Designer Desktop Discussions

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

How to replace the null value in rows?

RichardAlt
8 - Asteroid

Hi guys,

 

How can I replace the null values with name.

RichardAlt_0-1590664570223.png

I have 3 columns, ReportID, Name, and Amount.

As you can see in Name it has null value. I want to replace that with the name with same ReportID.

 

I want something like this. Same ID with same name.

   *ReportID      *   Name   *   Amount
123SAMPLE NAME1123,000.00
123SAMPLE NAME1432,444.00
123SAMPLE NAME1554
123456SAMPLE NAME2787,676.00
123456SAMPLE NAME22,345
123456SAMPLE NAME2234
1234SAMPLE NAME3143,435.00
1234SAMPLE NAME3123,412.00
2 REPLIES 2
deviseetharaman
11 - Bolide

Hi @RichardAlt 

 

Please use the Multirow formula tool. It should do in this case. Formula should be if !isnu

ll([Name]) then [Name] elseif [Row-1:ReportID] = [ReportID] then [Row-1:Name] else [Row+1:Name] endif

 

nullName.png

jarrod
ACE Emeritus
ACE Emeritus

Hi @RichardAlt ,

As a leader in the Alteryx Community, I have the ability to identify & mark accepted solutions on behalf of community members - and recently did so on this thread. If you have any questions or concerns with the solution(s) I selected please let me know by replying to this post.

 

I can see that @deviseetharaman's solution will work for the given sample, although there is one slight hiccup of there isn't a name for a single "ReportID" record. to accommodate that scenario, you can add one more "elseIf" condition on the back that defaults to NULL() if the row+1:RecordID != RecordID. I believe it would be ELSEIF [Row+1:RecordID] == [RecordID] THEN [Row+1:Name] ELSE null() ENDIF.


As the original author, you also have the ability to mark replies as solutions! Going forward, I’d encourage you to identify the solution or solutions that helped you solve your problem, as it's a big help to other community members. Learn more about Accepted Solutions here.

Thank you!

Labels
Top Solution Authors