Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ab00sa7i
Frequent Visitor

Most frequent values

Hi, I have a data looks like this:

WhatsApp Image 2024-07-23 at 3.41.15 AM.jpeg

 

I would like to find the first, second, and third most frequent errors for every ID

2 ACCEPTED SOLUTIONS
Irwan
Super User
Super User

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])
)

Irwan_0-1721699700894.png

 

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
)

Irwan_1-1721699763949.png

 

Result:

Irwan_2-1721699816869.png

Irwan_3-1721699829557.png

Irwan_4-1721699842308.png

 

Hope this will help you.

Thank you.

View solution in original post

Anonymous
Not applicable

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

vstephenmsft_0-1721899455630.pngvstephenmsft_1-1721899473425.pngvstephenmsft_2-1721899483390.png

 

2.Add index

vstephenmsft_3-1721899522364.png

vstephenmsft_4-1721899544451.png

vstephenmsft_5-1721899549982.png

Then you can easily filter the third error in Desktop.

For example:

vstephenmsft_6-1721899619544.png

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.

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

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

vstephenmsft_0-1721899455630.pngvstephenmsft_1-1721899473425.pngvstephenmsft_2-1721899483390.png

 

2.Add index

vstephenmsft_3-1721899522364.png

vstephenmsft_4-1721899544451.png

vstephenmsft_5-1721899549982.png

Then you can easily filter the third error in Desktop.

For example:

vstephenmsft_6-1721899619544.png

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.

 

Ashish_Mathur
Super User
Super User

Hi,

Share data in a format that can be pasted in an MS Excel file.  For that data, show the expected result.  Also, what result do you expect if there is a tie in the number of errors - show the result clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Irwan
Super User
Super User

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])
)

Irwan_0-1721699700894.png

 

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
)

Irwan_1-1721699763949.png

 

Result:

Irwan_2-1721699816869.png

Irwan_3-1721699829557.png

Irwan_4-1721699842308.png

 

Hope this will help you.

Thank you.

Thanks, this work for me

But if I have another table:

1000385006.jpg

and I need to filter some values (I need to apply rank in some error not all, only High errors like shown in table), I tried to add it in filter function but it doesn't work or I didn't know how, can you please show me how?

For this data:

1000385004.jpg

https://docs.google.com/spreadsheets/d/1H_nGLtnfXEe4qT3uhuNlPgaC0uWkjBRn/edit?usp=drivesdk&ouid=1008...

I have same problem and thanks for solution 
but I have more things to solve 

The ranking counts certain values, not all values

I want to specify the faults to be counted, not any values

Hello @engmohd 

 

You can add your expression requirement inside FILTER in RANKX. Add you specific faults as expression so it will calculate as your requirement.

 

Otherwise, please share your sample data (remove any confidential information).

 

Hope this will help you.

Thank you.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.