Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
i have this situation , i have created a TOP N table in this way
Solved! Go to Solution.
Revisiting this, I would be remiss if I didn't mention the even more straightforward way to do this by setting a top N filter straight through the UI.
1. Select your visual and open Filters pane
2. Expand filter options of your axis in the filter pane and select the Top N option
3. Select Top N option, add in the measure you want to rank by, and the desired N
Same output as what I provided above. Probably the better solution for its simplicity unless you need the dynamic N functionality I mentioned at the end of my post:
Again, going this route may circumvent your issues because you aren't creating a dynamic table just for the Top N functionality, so you can leverage the measures and relationships you've already set up.
You may want to avoid the issue entirely by using RANKX to filter your measure rather than construct a dynamic table. You can then use whatever already existing fields/measures related to WorldCupPlayers. This is just a guess given it's not clear exactly what you model looks like, but you can try something like this:
top 5 jugadores_m =
VAR _all_m =
GENERATE(
ALL( WorldCupPlayers[NombreJugador] ),
ROW( "m", [dax_total_goles mas penales] )
)
VAR _this_m = [dax_total_goles mas penales]
VAR _m_rank = RANKX( _all_m, [m], _this_m )
VAR _rank_cut = 5
VAR output =
CALCULATE(
[dax_total_goles mas penales],
FILTER( WorldCupPlayers, _m_rank <= _rank_cut )
)
RETURN
output
If you have something like the above working, you could then take it a step further and use a numeric range parameter instead of hard-entering 5, so the user can pick top X from a slicer. E.g. example output with dummy data:
thanks a lot i will try this solution!
Revisiting this, I would be remiss if I didn't mention the even more straightforward way to do this by setting a top N filter straight through the UI.
1. Select your visual and open Filters pane
2. Expand filter options of your axis in the filter pane and select the Top N option
3. Select Top N option, add in the measure you want to rank by, and the desired N
Same output as what I provided above. Probably the better solution for its simplicity unless you need the dynamic N functionality I mentioned at the end of my post:
Again, going this route may circumvent your issues because you aren't creating a dynamic table just for the Top N functionality, so you can leverage the measures and relationships you've already set up.
Hi,
If you want to use Related Function your table has to be related with another.
And has to be a relationship 1 to n or 1 to 1.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
25 | |
15 | |
14 | |
14 | |
9 |
User | Count |
---|---|
31 | |
20 | |
15 | |
15 | |
14 |