Forum Discussion

ab00sa7i's avatar
ab00sa7i
Frequent Visitor
2 years ago
Solved

Most frequent values

Hi, I have a data looks like this:   I would like to find the first, second, and third most frequent errors for every ID
  • Irwan's avatar
    2 years ago

    hello ab00sa7i 

     

    please check if this accomodate your need.

     

    the easiest way to achive this is by using SUMMARIZE.

     

    1. create new table with SUMMARIZE including with count of error

    Summarize =
    SUMMARIZE(
        'Table',
        'Table'[ComputerID],
        'Table'[Error Type],
        "Count Error",
        COUNT('Table'[Error Type])
    )

     

    2. create calculated column for ranking or indexing (to show first, second, third most frequent error).

    Rank =
    RANKX(
        FILTER(
            'Summarize',
            'Summarize'[ComputerID]=EARLIER('Summarize'[ComputerID])
        ),
        'Summarize'[Count Error],
        ,
        DESC
    )

     

    Result:

     

    Hope this will help you.

    Thank you.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ab00sa7i ,

     

    You can try Irwan 's workaround.

    Here I want to share another possible workaround.

    You can create sort field group by Computer ID in Power Query.

    1.Group by

     

    2.Add index

    Then you can easily filter the third error in Desktop.

    For example:

    Best Regards,

    Stephen Tao

     

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