community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Compare and Match align fields data

Highlighted
Asteroid

Hello All,

how to align the field1 data based on field2 matching data in alteryx. please find the expecting output.

Kindly Suggest me.

 

RAW Data:

Field1Field2
[Null]I
LC
IG
CK
GL

 

 

Result

Field1Field2Matching Level
[Null]I1
IG2
GL3
LC4
CK5


Thanks in Advance
NR

 

Alteryx
Alteryx

@Niranjan123 

 

This can be done using an iterative macro. 

 

I have attached a workflow package containing a macro I built which will give leveling information based on the input format you provided.

 

Essentially we needed to create something that loops through the data row by row and matches the Field 2 of the Row -1 with the Field 1 of the current row. 

 

Below is a screenshot of the internals of my macro. 

 

 

clipboard_image_0.png

 

 

Alteryx Certified Partner

Hi

 

A suggestion without using macro is based on this example that you passed

Follows attached workflow

 

 

[]

 

 

Quasar

Hi @PeterA1 ,

Can you attach file again  .  I can't  find  macro in yxzp .  

Alteryx
Alteryx

Hi @benakesh 

 

Is the macro appearing as a question mark box?

 

I have attached the  macro separately now so this should work. Let me know if not. 

 

Also, if you map your macro folder they can appear in your tool palette.

 

There will be a tool category called macros that will contain all .yxmc macro files you save to that file location.

 

Shown here in User Settings:

 

clipboard_image_0.png

 

 

 

Quasar

HI @PeterA1 ,

Your macro helped me  resolve my error.

Thanks!

 

Quasar

Hi @PeterA1 ,

Your macro helped me  resolve my error.

Thanks!

 

Labels