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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JPS_SEQ
Regular Visitor

Power BI basic doubts

Hi, 

 

My database is a excel file with a list of several inputs.  One of the columns from that list is called "Name". 

I 'd like to create a top5 of the name most times inserted in that list. 

 

I create a table and apply FILTER N with TOP 5, and the top5 names appears. Howerver, the number of time for each name does not apperar in the table. Can anyone help me please ? 

 

 

Other question:

The databse uses two excel tabs.

I 'd like to calculate a ratio between two variables from each tab respectively. It is that possible ?

3 REPLIES 3
Anonymous
Not applicable

Thanks solutions from @Trevor_G and @audreygerred , your solution is great!

Hi, @JPS_SEQ 

Pls have you solved the current problem as well? If so, you can mark a helpful reply as a solution so that other members of the community can quickly find a solution if they encounter similar doubts or problems.

 

Best Regards

Jianpeng Li

Trevor_G
Frequent Visitor

Question 1: 

There are multiple ways to handle this. 

Here is one: 

Create a new table with only the topN results: 

Top5 Table Calculation.png

 

Create a measure to count the times the name apprears in the first table: 

Name Count Measure.png

 

Changes the 'Value' settings to be 'Count' (rather than sum):

Name Count Values Settings.png

 

Final results (both tables side by side): 

TopN Results.png

 

The name Oscar does not appear on the second table, and count of each name is on the second table

 

 

Question 2: 

This is possible. 

 

For a basic design on how to achieve this, you should use a 'Dimensional' table to connect tables together (Model View shown below): 

Multi-table design simple.png

 

These types of tables connect the data together and allow for calculation to be performed: 

Measures from two tables.png

 

Here is the measured used to do this: 

Math from multiple tables.png

 

Here are the columns used to make the final visual: 

Visual using dimensional table.png

audreygerred
Super User
Super User

If I understand correctly, you want the Top5 Names based on how many times the name appears in the list - if that is correct, you can make a measure that will count the rows like, Name Count = COUNTROWS(YourTable) COUNTROWS function (DAX) - DAX | Microsoft Learn

Then, when you do your TopN filter, put the measure you made in the 'By value' section, so it will return you the Top5 Names based on the countrows measure.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.