Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

IF VALUE DUPLICATE

Hi Team

 

i need your help

i have data , which is im willing to remark if within column there are same value will result same as table below

 

again, i also want to know how to remark but only on 2nd value which is duplicate. i mean , want to keep 1st value which is having duplicate value still in there while im doing filter based on remark

 

really appreciate your help

 

Warm Regards

Syaiful

  • Hi Anonymous ,

    Please try this:

    • Get an index column in Query Editor

    • Create a calculated column
    Column = 
    VAR a =
        RANKX (
            FILTER (
                'Table',
                'Table'[DATA] = EARLIER ( 'Table'[DATA] )
                    && 'Table'[DATE] = EARLIER ( 'Table'[DATE] )
            ),
            'Table'[Index],
            ,
            ASC
        )
    RETURN
        IF ( a > 1, "Yes", "No" )

    Best Regards,

    Xue Ding

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

7 Replies

  • Hi,

    This calculated column formula should solve the first question

    =IF(CALCULATE(COUNTROWS(Table),FILTER(Table,Table[Data]=EARLIER(Table[Data])))>1,"Yes","No")

    As regards the second question, we will need to create an Index column in the Query Editor but that step can be avoided if you have already have one or if you have a date column which should distinguis each row from the other.  So do you have any such additional column?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Dear Ashish_Mathur 

      solved for 1 question,

       

      2nd question
      can you give me an example , how to indexing ?
      what about if date also same (below table)?

       

       

       

      Thanks

      Syaiful

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        If my previous reply helped, please mark it as Answer.  Read my previous reply carefully.