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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Clint
Helper V
Helper V

Calculating Top N across columns

Hello,

 

I have a datasource that tracks initiatives and the projects that affect each initiative.  Each initiative is a column and each project is a row.  I've been asked to show a Top N (Top 3 Initiatives by count of projects) across these initiatives.  I Is there a way to calculate a Top N across columns w/o modifying the data model?  If not, what is the best practice approach to doing so?

6 REPLIES 6
Anonymous
Not applicable

hi @Clint 

 

You can try this:

 

-In the visual level filters on the right side of your report as shown in the screesnhot below:

-in the BY Value , you can drag the Project field from your dataset and chnage it to count.

- Change pay plan field to your required field

 

Hope this helps!

 

Capture 21.PNG

Hello @Anonymous ,

 

To clarify, I need to calculate the Top N across values in multiple columns, not just one.  I have something like 7 columns representing various attributes and each row in the dataset is a project name.  I need to find the Top N (3) of project name count from all 7 columns; meaning which three 3 columns have the highest number of projects associated to them.

Anonymous
Not applicable

Hi @Clint ,

 

May be you can provide me some sample data to recreate the issue.

 

Thanks,

Tejaswi

 

Hello @Anonymous ,

 

Here is a dummy of what the table structure looks like (removing proprietary info)

Project NameStatusClose ReasonMicro Stage GateDate CreatedClosure DateVarianceColumn1Column2Column3Column4Column5Column6Column7Column8Column9Column10
Project 1Open     1  11 1 11
project 2In progress      11  11   
Project 3Closed  6/30/2019  11   1 11 
Project 4Open     1 1   1  1
                 
Anonymous
Not applicable

Hi Clint,

 

What I understood after looking at your dummy data is that, you want the summation of all the count in each column for all your projects and identify the highest summation for each of these columns.

 

Correct me if I am wrong.

if What i undersood is correct, then can you show the table somethign like this??

Capture 12223.PNG

This is because Power BI support doesn't support multiple Top N in Visual level filters.

 

May be you need a Calculated column.

 

you can refer this post :

https://community.powerbi.com/t5/Desktop/TOPN-for-two-columns/td-p/545097

 

 

 

Thanks,

Tejaswi

Thanks @Anonymous , I just created a couple of tables in excel to pull the data together in the way I needed it to do the Top N.  The datamodel of the source just needs to be restructured I think to give us more flexibility in working with it.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors