Ravindra BagaleCourses & study guides

22. Filters and Slicers

22.4 Top N Filter

Steps in Power BI – top 5 products in Nagpur

  1. Select a bar chart with Product[Product Name] on the axis (City slicer = Nagpur).
  2. In Filters on this visual, expand Product Name › Filter type › Top N.
  3. Show items: Top, 5. Drag [Total Sales] into By value › Apply filter.
  4. Change the City slicer to Kolhapur. The top 5 are recalculated.

Lakshat theva, use Bottom to find the weakest products or slowest dark stores. For a user-controlled N, see Module 21.5.

Ravindra Bagale's Tip

Friends, remember: the Top N filter is evaluated in the visual's context, and students are surprised when the "Top 5 products" change with the City slicer. That is correct behaviour, so explain it in the title ("Top 5 products in selected city") or remove the slicer interaction if it should be fixed. Remember this rule.