2023 Week 40 | Power BI: Bar chart label bonanza

Introduction

Last week’s workout caused some healthy discussion about bar chart labeling preferences and best practices. This week we will look at other ways to implement space saving labels while also showing the data labels for the each bar in a bar chart. 

The report shown below demonstrates 4 ways to implement bar chart labels when horizontal space is limited. Your goal is to implement all four ways and identify the advantages and disadvantages of each. Two of them use custom visuals and two use core visuals to accomplish the goal. The first bar chart is essentially the same as last week’s, but the labels are placed above. 

Requirements

  1. Use the web connector to retrieve the data from https://data.austintexas.gov/resource/9t4d-g238.json
  2. Filter the data to include only animal types of Cat and Dog. 
  3. Create a DAX measure that counts the number of distinct animal ID values where the outcome type is Adoption. 
  4. Add a slicer to allow users to choose between dogs and cats. 
  5. Use the clustered bar chart core visual to create a bar chart that counts adoptions by breed. The breed label and adoption total should be shown above each bar. 
  6. Use the Deneb custom visual to create a bar chart that shows adoptions by breed. The breed should be labeled above the bar. The adoption totals should be shown to the right of each bar and be right-aligned. (Hint.)
  7. Use the horizontal bar chart custom visual to create a bar chart that shows adoptions by breed. The breed should be shown inside the bar, and the adoption total should be shown to the right of the bar. 
  8. Use the table core visual to create a “bar chart” that shows adoptions by breed. The breed should be shown to the left of the bar. The adoption total should be shown to the right of the bar and be right-aligned. 

Dataset

This week’s dataset comes from the City of Austin, TX. Use the web connector in Power BI to connect to https://data.austintexas.gov/resource/9t4d-g238.json.

Share

After you finish your workout, share on Twitter using the hashtags #WOW2023 and #PowerBI, and tag @MMarie, @shan_gsd, @KerryKolosko. Also make sure to fill out the Submission Tracker so that we can count you as a participant this week in order to track our participation throughout the year.

Solution

Solution File available for download via Data Stories Gallery

Scroll to Top