Alteryx Designer Desktop Discussions

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

Row Comparison

nkumarjha
7 - Meteor

Hi

I am new to Alteryx and i am trying to use it for a row comparison scenario,

if Part Number (row 1)=part number(row 2) then Min(Prices Quoted). it needs to work for all the duplicate Part numbers. 

Thanks a lot for helping

 

IDPart NumberPrices QuotedPrices.MOQSupplier Name
1210-0698910.2883000ABCD
2210-0698910.538753000DEF
1240-0234800.573000gfdc
2240-0234800.63000bdls
1240-07776222.5500hdsa
2240-07776226360dshd
1310-0356691.91000dscf
2310-0356691.91000nfsd
1310-0519231.91000bfds
2310-0519231.91000fghh
1430-04676164.5500wfehg
2430-04676153500afgewg
1430-04676250500wgwh
2430-04676257.2500sgwea
1430-04676358.5500aghah
2430-04676355500whakh
8 REPLIES 8
Ladarthure
14 - Magnetar
14 - Magnetar

Hi, 

 

to do so you could use a multi row formula tool and the formula should be something like this :

if [Row-1:Part Number] = [Part Number] then min([Row-1:Prices Quoted],[Prices Quoted])
else null() endif

 

it gives you the minimum price then you can filter the null values

 

Or you could simply use a summarize tool, do a group by on part number and a min on Prices Quoted.

 

Hope it helped!

JordanB
Alteryx
Alteryx

Hi @nkumarjha

 

The easiest way would be to use a summarize tool and Join.

 

The summarize tool can find the minimum for each part number and then you can simply use a join tool to add this field to your master dataset.

 

Workflow attached

 

Best,

 

Jordan

nkumarjha
7 - Meteor

Thanks a lot Jordan,  I was able to get to end result. 

nkumarjha
7 - Meteor

Hi Ladarthur, thanks for your help. 

 

I did use the multi row function but the expression is giving an error. 

 

Regards

Nk

Ladarthure
14 - Magnetar
14 - Magnetar

@nkumarjha could you send me the workflow so that I give a look?

nkumarjha
7 - Meteor

@

Ladarthure
14 - Magnetar
14 - Magnetar

Here it is, you needed a space between if and the variable name, I just modified a bit the formula to work :)

nkumarjha
7 - Meteor

Labels