Skip to Content
author's profile photo Former Member
Former Member

Check duplicate rows on condition

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 18, 2016 at 01:30 PM

    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


    Untitled.png (38.9 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.