Alteryx Designer Desktop Discussions

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

Data formatting

reginawhelan
8 - Asteroid

Within the attached are two examples. Sheet1 is an example of the flow output, Sheet2 provides the desired results. 

 

This data will be uploaded into the system and the template for the upload doesn't accept duplicate information for some columns.

 

For example, within the attached (sheet1) the data is unique in columns Data#3 and Data#6 but the same in Data#1 and Data#2. 

Data#1Data#2Data#3Data#6
Data#1014Data#2P-FNGL0.95
Data#1014Data#2P-FMLY0.95
Data#1014Data#2P-FPFM0.95

The desired results would be removing the duplicate data in columns Data#1 and Data#2. 

Data#1Data#2Data#3Data#6
Data#1014Data#2P-FNGL0.95
  MLY0.95
  PFM0.95

I would want the data in column Data#6 to remain even though it's duplicates.

 

The number of rows would increase/decrease depending on the customer.

 

Does anyone have any ideas on how to solve for this?

 

Thanks,

Regina

2 REPLIES 2
SamDesk
11 - Bolide

Hello @reginawhelan,

 

So this is something we can do pretty easily with the Multi-Row Formula tool. It's a little bit trickier than usual as you're wanting to change two fields at the same time but as shown in the attached workflow, this is achievable by giving each record a unique identifier first.

 

Annotation 2020-08-26 150317.png 

 

Hope this helps!

 

Sam 🙂

CharlieS
17 - Castor
17 - Castor

Hi @reginawhelan 

 

The Multi-Row Formula tool is helpful for this. I use two of them (one for each field) and a Select tool to rename some fields. The Multi-Row Formula tool can determine if the current value is the same as the row above (aka "Row-1") and if so, remove the value. The trouble is that if we replace the existing field, then the null replacement would complicate things, So I recommend creating two new fields (each with a Multi-Row Formula tool), then rearranging the fields with a Select tool.

 

Check out the attached example to see what I'm talking about in action. 

 

20200826-DuplicateRows.PNG

Labels