cancel
Showing results for 
Search instead for 
Did you mean: 

Check duplicate rows on condition

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

amitrathi239
Active Contributor
0 Kudos

follow these steps.

Create variable Contract Count=Max(RunningCount([Contract];([Contract]))) In ([Contract])

Final Variable =If(([Contract Count]>1) And [Year]=2016) Then "Show" ElseIf([Contract Count]<=1) Then "Show" Else  "Hide"

Apply the filter and display values where equal to Show

Former Member
0 Kudos

Thanks Amit, you formula works fine.

Regards,

Ankit

Answers (0)