Forum Discussion

DataAnalysis's avatar
DataAnalysis
Frequent Visitor
4 years ago
Solved

How to Count Duplicated row?(Distinct Column? Index Column?)

Hello. I am PowerBI User living in Korea. I solved many problems with your help. Thank you very much. Data processing is required by utilizing duplicate data. My current table is as follows. For...
  • johnt75's avatar
    4 years ago

    I think you can do this in Power Query. Select the case number column and choose Group By. Add 2 aggregations, 1 using count rows and 1 using all rows. You can expand the 2nd column to bring back all the data, and then add another new column dividing the actual hours column by the num duplicates column.

  • Shishir22's avatar
    4 years ago

    Hello DataAnalysis,

     

    Try measure as- 

    CountofDuplicateRow = CALCULATE(COUNT('Table'[CaseNumber]),ALLEXCEPT('Table','Table'[CaseNumber]))
    HoursDivideDuplicateRow = Divide(AVERAGE('Table'[ActualHours]),[CountofDuplicateRow])

     

    Please accept it as solution if it solves your issue. Kudos are also appreciated.

     

    Cheer,

    Shishir