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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
JWillis
New Member

Finding Top Columns Based on First Column

I have data that looks like this, but with far more columns:

IDColumn 1Column 2Column 3
001110
002010
003111

The first column is an identifier that connects to records on my other tables and the remaining columns give a binary yes or no for that column. I could show all of them, but I don't want to show all 50+ columns.
I'm trying to find a way to show the top 3 based on the current filters applied to the report. I know I can calculate the overall top 3 using powerquery, but then they won't adjust as filters are applied. Is there any way to find the top n columns without losing the identifier in the first column?

2 REPLIES 2
ToddChitt
Super User
Super User

"I'm trying to find a way to show the top 3 based on the current filters applied to the report."

Top 3 based on what criteria? Based on the Average across the row? Why and average? Why not simply the count of 1's for any one row. 

Assume the columns are INT, (NOT boolean), then you could have a Calculated Column like this:

[Number of YES] = [Column1] + [Column2] + ... + [Column50]

If you really need the average, then: ( [Column1] + [Column2] + ... + [Column50] ) / 50

Or, better: DIVIDE ( : ( [Column1] + [Column2] + ... + [Column50] ) , 50, 0 )

Once you have that, can you not simply do a TOP N Filter on the visual and use that calculated column?

 

Am I missing something?

 




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





I want the top three columns as in the column with the highest average (average of all numbers in the column, not across the row). I need the average for each column because 1 indicates yes for that row in that category so an average will give me a percentage of records that hit for that category. I could just average the columns beforehand but if I apply filters from my other tables, it would still show the overall percentage, not the percentage for the applied filters.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.