Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculating rows

I am calculating duplicates using the formula   IsDuplicate = IF( COUNTROWS(Incident) > COUNTROWS(DISTINCT(Incident[Short Description])),TRUE(),FALSE())   I am able to get the duplicates in tabl...
  • ValtteriN's avatar
    3 years ago

    Hi,

    Here is how I would go about this:


    Test data:

    Expected result = A to D are duplicates count = 4


    Measures:

    IsDuplicate = IF(COUNTROWS('Table (27)')>1,1,0) //since the amount of rows above 1 in a set filter context means the row is duplicate I am using this logic

    TotalDuplicates = SUMX(SUMMARIZE('Table (27)','Table (27)'[Column1]),[IsDuplicate]) //Instead of booleans I am using 1 and 0 to indicate duplicates this way I can utilize SUMX to get the duplicate amount


    End result:

     

    I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

    My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/