In the previous post, we rebuilt a Tableau-style Cluster + SubCluster parameter pattern in Power BI using disconnected tables, slicers, and DAX.
In this post, we’ll tackle another pattern that appears in almost every Tableau dashboard:
Top N filtering that users can control dynamically.
In Tableau, this is often:
- a parameter (Top 5 / Top 10 / All)
- combined with a dimension (City, Category, Region)
- applied directly to the view
In Power BI, this cannot be done with a standard slicer alone—and understanding why is key to implementing it correctly.
What We’re Building
By the end of this post, we’ll have:
- a Top N selector slicer (1,2,3, All)
- without hard-coding Top N into the visual
- works on a single bar chart
- defaults to showing all values
- integrates cleanly with later Cluster / Sub-Cluster logic

Step 1: Why Power BI Top N Works Differently Than Tableau
Before jumping into DAX, it’s important to reset expectations.
Tableau
- Top N is evaluated after parameters and filters
- Tableau controls the query order internally
Power BI
- Top N filters are:
- visual-level only
- static
- not slicer-driven
- You cannot bind a slicer directly to a Top N filter
So instead of filtering rows, we must:
Control ranking inside a measure
This is the key mental shift.
Step 2: Create the Top N Selector Table (Disconnected)
Go to Modeling → New table:

Add TopN as a single-select slicer.
This replaces a Tableau parameter.
Step 3: Add the Top N Slicer
- Insert a Slicer
- Field:
Top N Selector[TopN]

At this stage, the slicer does nothing yet—and that’s expected.
Step 4: Create the Ranking Measure
This measure ranks City by Total Events.

Step 5: Create the Top N Filter Measure
Now we compare the rank to the slicer value.
This is the most important step.
In Tableau, clearing a parameter usually means “show everything.”
In Power BI, slicers do nothing unless you explicitly handle that case.

What This DAX Is Doing
ISFILTERED()
Checks whether the user has actively selected a value in the Top-N slicer.
This lets us detect the difference between “user chose Top 3” and “nothing selected”.SELECTEDVALUE()
Retrieves the selected Top-N number (1, 2, or 3).
If nothing is selected, it returns blank.- Ranking measure (
SubCluster Rank)
Pre-ranks categories based on the metric (e.g. Total Events).
This replaces Tableau’s built-in Top-N logic. - Conditional
IFlogic- If no slicer selection exists, return
1for all rows → show everything - If a Top-N value is selected, return
1only for rows ranked ≤ N
- If no slicer selection exists, return
- Visual-level filter (
is 1)
The bar chart only displays rows that return1, making the Top-N behaviour dynamic.
Conclusion: From Static Top-N to Fully Dynamic Analysis
At this point, we’ve successfully rebuilt a Tableau-style dynamic Top-N pattern in Power BI.
Instead of relying on Power BI’s built-in Top-N filter (which is static and visual-level only), we’ve:
- shifted ranking logic into DAX
- used a disconnected Top-N selector table to mimic a Tableau parameter
- explicitly handled the “nothing selected = show everything” case
- applied Top-N logic through a measure-driven visual filter
This is the key mindset change when moving from Tableau to Power BI:
In Power BI, Top-N is not a filter — it’s a calculation.
Once you accept that, the behaviour becomes predictable, controllable, and extensible.


