Forum Discussion

kevinedora's avatar
kevinedora
Helper I
2 years ago
Solved

Duplicate Identifier

Hi,

 

Need help, i need to identify a duplicate within a date range. Below table is an example, i wanted to know if last month (June) if i have a duplicate ID and category = "Charged" then I want my tagging to be duplicate so I can exclude that ID from last month.

 

DateIDCategory
06/13/202412344Charged
06/14/202412345No
07/01/2024   12344No Charge
07/08/2024   12345No Charge

 

Desired Result:

 

DateIDCategoryTagging
06/13/202412344ChargedDuplicate
06/14/202412345Nono
07/01/2024   12344No Chargeno
07/08/2024   12345No ChargeOriginal

 

I'll greatly appreciate if this can be dynamic as well since I have 1 year worth of data.

  • kevinedora 

    you can try this

     

    Column =
    var _check=maxx(FILTER('Table','Table'[Date]>EOMONTH(EARLIER('Table'[Date]),0)&&'Table'[Date]<=EOMONTH(EARLIER('Table'[Date]),1)&&'Table'[ID]=EARLIER('Table'[ID])),'Table'[Date])
    return if('Table'[Category]="Charged"&&not(ISBLANK(_check)),"Duplicated")
     

2 Replies

  • kevinedora 

    you can try this

     

    Column =
    var _check=maxx(FILTER('Table','Table'[Date]>EOMONTH(EARLIER('Table'[Date]),0)&&'Table'[Date]<=EOMONTH(EARLIER('Table'[Date]),1)&&'Table'[ID]=EARLIER('Table'[ID])),'Table'[Date])
    return if('Table'[Category]="Charged"&&not(ISBLANK(_check)),"Duplicated")
     
  • Ray_Minds's avatar
    Ray_Minds
    Solution Supplier

    Hi kevinedora 
    Duplicate Values = CALCULATE(COUNT('Sheet1 (2)'[Section]),FILTER('Sheet1 (2)','Sheet1 (2)'[Section]= EARLIER('Sheet1 (2)'[Section])))

     

    If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.