This week we’re revisiting Meagan’s challenge where we built a bar chart with long labels. We’re going to use a trick recently unveiled by Bas (@howtopowerbi on Twitter) to create custom labels for bar charts.
If you have long labels in your bar chart, they may be truncated depending on the size of the bar chart. Using this method, you’ll add your labels essentially as a row in the bar chart, enabling them to display fully and be readable!
Check out the interactive report below.
Get and transform data
- Get data from the web or use Meagan’s pre-built data model.
- Create a placeholder measure with a value of 0. You’ll use this to make space for your data labels in the bar chart.
- Create a measure that will display your data label. In this case, make your measure display the animal breed.
Create your bar chart
- Add a bar chart to the canvas
- Turn the data labels off
- Add a custom data label
- Add any other visuals that you’d like!
- Ensure that all visuals meet the minimum standards of having alt text, that the tab order in your report makes sense, and that your color choices meet the minimum standards.