Ravindra BagaleCourses & study guides मराठी Track your progress

How to Show Top 5 and Bottom 5 in Power BI with Data Labels and Format Painter

"Where do we sell the most, and where are we weakest?" Every sales review starts with these two questions. In Power BI the answer is two charts: the top 5 states and the bottom 5 cities by revenue. In this chapter you bring the store locations into the sales table, build both charts with Top N filters, make the numbers on the bars easy to read, and copy that look from one chart to the other in a single click with Format Painter.

What you'll learn in this chapter

  • Bring state and city into sales (Left Outer merge)
  • Top 5 states with a Top N filter
  • Bottom 5 cities with Show items Bottom
  • Why a (Blank) city appears, and how to remove it
  • Data labels: size, bold, Display units, decimals
  • Format Painter: copy one chart's look to another

Practice files: blinkit-sales-2025-stores.csv (900 orders from 11 stores) and blinkit-store-cities-clean.csv (10 stores with state and city).

Made-up data: fictional Blinkit-style orders and stores in 2025, for practice only. Amounts are in ₹.

1. The problem

The sales table has a store_id but no state or city. The store table has state and city but no sales. You need:

  1. a chart of the 5 states with the highest revenue, and
  2. a chart of the 5 cities with the lowest revenue,

both with readable numbers on the bars and the same look, so they sit well side by side.

2. The idea in simple words

Top 5 states by revenue (₹)76,450Maharashtra40,271Karnataka17,998Telangana16,770Gujarat14,261Tamil NaduBottom 5 cities by revenue (₹), blanks excluded2,277Jaipur8,980Indore9,472Mysuru11,627Nagpur14,261ChennaiIllustration (fictional data)

Figure 1. Top 5 states and bottom 5 cities by revenue, with full numbers as data labels (illustration).

Classroom line

When merging, you have to say which column is common to both tables.

3. The data

After the merge, the sales table has 900 rows and total revenue ₹1,79,538. Store 111 is new and not yet in store_cities, so its 19 orders (₹2,531) have a blank state and city.

state revenue (₹)
Maharashtra 76,450
Karnataka 40,271
Telangana 17,998
Gujarat 16,770
Tamil Nadu 14,261
Madhya Pradesh 8,980
(Blank) 2,531
Rajasthan 2,277
city revenue (₹) city revenue (₹)
Pune 38,733 Chennai 14,261
Bengaluru 30,799 Nagpur 11,627
Mumbai 26,090 Mysuru 9,472
Hyderabad 17,998 Indore 8,980
Ahmedabad 16,770 (Blank) 2,531
Jaipur 2,277

4. Step by step

Bring state and city into sales

  1. Load both files and open Transform data. Select the sales query.
  2. Home › Merge Queries. Second table: store_cities. Click store_id in both tables. Join Kind: Left Outer (all from first, matching from second). OK.
  3. Click the expand icon on the new store_cities column. Tick only state and city, untick Use original column name as prefix, OK.
  4. Close & Apply.

Top 5 states

  1. Insert a Clustered column chart: X-axis state, Y-axis revenue.
  2. With the chart selected: Filters pane › Filters on this visual › state › Filter type Top N › Show items Top 5 › By value revenue › Apply filter.
  3. Format visual › Visual › Data labels: On. Under Values: font size 14, bold, Display units None, Value decimal places 0.
  4. General › Title › text: Top 5 states by revenue.

Bottom 5 cities

  1. Insert a Stacked column chart: X-axis city, Y-axis revenue.
  2. Filters on this visual › city › Top N › Show items Bottom, 5 › By value revenue › Apply filter.
  3. A (Blank) bar appears with 2,531: the orders of store 111. Drag state into Filters on this visual › Filter type Advanced filtering › Show items when the value is not blank › Apply filter. The Bottom 5 now shows real cities only.

Copy the look with Format Painter

  1. Click the Top 5 states chart.
  2. Home › Format painter (the paintbrush icon).
  3. Click the Bottom 5 cities chart. Its data labels, fonts and colours now match. Change its title to Bottom 5 cities by revenue.
1. Select the formatted chart (state chart)2. Home › Format painter (paintbrush icon)3. Click the other chart (city chart)4. Labels, fonts and colours are copied; fields and filters are notIllustration (fictional data)

Figure 2. Format Painter from top to bottom: select the formatted chart, click Format painter, click the other chart; the look is copied, the fields and filters are not (illustration).

Classroom line

The formatting you did on one visual can be copied to another visual as it is.

5. Your result should look like this

Chart Bars (₹)
Top 5 states by revenue Maharashtra 76,450 · Karnataka 40,271 · Telangana 17,998 · Gujarat 16,770 · Tamil Nadu 14,261
Bottom 5 cities by revenue Jaipur 2,277 · Indore 8,980 · Mysuru 9,472 · Nagpur 11,627 · Chennai 14,261

Labels read 76,450, not 76.45K. Before the "is not blank" filter, the bottom 5 was Jaipur, (Blank), Indore, Mysuru and Nagpur.

6. What happened

  • Left Outer kept all 900 sales rows. An Inner join would have dropped store 111's 19 orders and shown total revenue of ₹1,77,007 instead of ₹1,79,538.
  • Top 5 ranked the states by the sum of revenue and kept the highest five. Bottom 5 did the same from the other end.
  • (Blank) is a real item to Power BI: the rows with no city have revenue, so they take part in the ranking. Filtering state "is not blank" removes those rows from this visual only; the card total still includes them.
  • Display units None and 0 decimals show the full number. With Auto, Power BI shortens to K.
  • Format Painter copied the formatting only. The city chart kept its own fields and its own Bottom 5 filter.

Classroom line

Don't sit quietly; tell me if something is not clear.

7. Explore further

  • Bottom N and zero sales. Bottom N only ranks items that have rows in the data. A city with no orders at all does not appear; to show it you need the city from a store table related to sales (next chapter).
  • Ties. If two cities tie at the cut-off, both are kept, so "Bottom 5" can show 6 bars.
  • Sort. Top N does not sort the bars. Use More options (…) › Sort axis › revenue, descending for the top 5 and ascending for the bottom 5.
  • Format Painter on many visuals. Click Format painter again for each extra visual. The look also works between different chart types, as far as the settings exist on both.
  • Fix the blank at the source. The best fix for (Blank) is to add store 111 to store_cities. The filter is a stopgap until the store list is updated.

Classroom line

Tell me, what do we do next?

8. Common mistakes

Wrong result Reason Fix
Revenue drops after the merge Join Kind Inner Use Left Outer
Columns named store_cities.state Prefix left ticked when expanding Untick Use original column name as prefix, or rename
Bottom 5 shows a (Blank) bar Sales rows with no matching store Filter state is not blank, and add the store to store_cities
Bottom 5 shows the biggest cities Show items left on Top Choose Bottom
Labels show 76.45K Display units Auto Display units None, 0 decimals
Format Painter changed nothing Clicked the empty canvas instead of the chart Select the source chart, click Format painter, then click inside the target chart

Ravindra Bagale's Tip

Format one chart perfectly, then paint the rest. Your report gets one font size, one label style and one colour for revenue, and a report that looks consistent is trusted more, even before anyone reads the numbers.

9. Practise on your own

Practice task

Use blinkit-sales-2025-stores.csv and blinkit-store-cities-clean.csv, merged with Left Outer.

  1. Which are the top 3 cities by revenue?
  2. Which are the bottom 3 states, with blanks excluded?
  3. Change the Top 5 states chart to Top 5 by sales (units). Does the order change?
  4. What total revenue would a card show if you had used an Inner join?
Show solution
  1. Pune 38,733, Bengaluru 30,799, Mumbai 26,090.
  2. Rajasthan 2,277, Madhya Pradesh 8,980, Tamil Nadu 14,261.
  3. No. By units: Maharashtra 634, Karnataka 327, Telangana 167, Gujarat 140, Tamil Nadu 113.
  4. ₹1,77,007 (881 rows); store 111's ₹2,531 would be lost.

10. Think like a professional

  • Business view. Top 5 shows where to invest; bottom 5 shows where to look for problems. Show both on one page.
  • Say the rule in the title. "Bottom 5 cities by revenue (excluding unknown stores)" tells the reader exactly what they see.
  • Treat (Blank) as a signal. A blank city means master data is missing. Report it to whoever maintains the store list.
  • Consistency is a feature. Use Format Painter, or a report theme, so every chart follows the same style.

Interview questions

  1. How do you show the bottom 5 cities by revenue? Filters on this visual › city › Top N › Show items Bottom 5 › By value revenue.
  2. Why does (Blank) appear in a Top N chart? Rows with no matching value in the merged or related table; they have revenue, so they are ranked.
  3. What does Format Painter copy? Formatting only: labels, fonts, colours, title style. Not fields or filters.
  4. Left Outer or Inner when adding store details to sales? Left Outer, so no sales row is lost.

Recap

In short

  1. Merge store_cities into sales on store_id with Left Outer.
  2. Top N › Top 5 by revenue for states; Bottom 5 by revenue for cities.
  3. Remove (Blank) with state is not blank; fix the store list at the source.
  4. Data labels: bigger, bold, Display units None, 0 decimals.
  5. Format Painter copies the look, not the fields or filters.

Ravi Sir's Cards for this lesson

मराठी cards