Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Identify duplicate entries

Good Afternoon,   I hope someone can help. It is a bit confusing but I will try to explane to the best my ability.   I have unique activities which were raised and completed between certain times...
  • v-jiascu-msft's avatar
    v-jiascu-msft
    7 years ago

    Hi Anonymous,

     

    Try this formula, please.

    Column =
    VAR dupCount =
        CALCULATE (
            COUNTROWS ( 'Table1' ),
            FILTER (
                'Table1',
                Table1[Post code] = EARLIER ( Table1[Post code] )
                    && Table1[Street] = EARLIER ( Table1[Street] )
                    && Table1[Completed Date] = EARLIER ( Table1[Completed Date] )
                    && Table1[Activity] <= EARLIER ( Table1[Activity] )
            )
        )
    VAR lastRaisedDate =
        CALCULATE (
            MIN ( Table1[Raised Date] ),
            FILTER (
                'Table1',
                Table1[Post code] = EARLIER ( Table1[Post code] )
                    && Table1[Street] = EARLIER ( Table1[Street] )
                    && 'Table1'[Activity]
                        = EARLIER ( Table1[Activity] ) - 1
            )
        )
    RETURN
        IF (
            [Raised Date] <= [Completed Date]
                && [Raised Date] >= lastRaisedDate
                && dupCount > 1,
            "Y",
            "N"
        )
    

    Identify-duplicate-entries

     

    Best Regards,
    Dale

  • Anonymous's avatar
    Anonymous
    7 years ago

    Thank you so much for this. However, when i enter the formula i get this error message. I cannot work it out why tho..

     

    Thank you

     

     

     

  • v-jiascu-msft's avatar
    v-jiascu-msft
    7 years ago

    Hi Anonymous,

     

    What's the Data type of [Activity]? It should be a numeric type to work with the formula. Can you change it or share a more accurate sample, please?

     

     

    Best Regards,
    Dale