Skip to Content
0
Former Member
Jul 18, 2016 at 12:00 PM

Check duplicate rows on condition

37 Views

Hi Experts,

I have a requirement where I need to display unique rows based on below data.

Contract Year Take Amount

A1 2012 Yes 2000

A2 2011 No 1200

A3 2015 Yes 3000

A3 2016 Yes 2400

A5 2014 No 3200

A5 2015 Yes 3200


Now I have to check first if we have any duplicate contract then check the year = 2016 and Take = Yes of those duplicate contract and pick then Year=2016 and Take=Yes condition row.

If we do not have duplicate contract then simply show that row in table.


Looking to above data and fulfilling th conditions we will have


Contract Year Take Amount

A1 2012 Yes 2000

A2 2011 No 1200

A3 2016 Yes 2400

but I don't know how to put duplicate contract condition and then check Year and Take in duplicate contracts.

Can you help me on the solution.

Thanks and Regards,

Ankit