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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors