When you want a quick way to display rank change, one option is Power BI’s Ribbon Chart. The Bump Chart is a common chart used for a similar purpose. Don’t be fooled by the complexity of the flow or ribbon in the Ribbon Chart. The Bump Chart is actually the more difficult chart to create in Power BI!
The Ribbon Chart visually has a lot going on, but simply drop in a few fields, and you’re done. The rank in this chart is displayed like a stacked column chart, with the highest rank value sorted to the top. The bar displays an actual measure value instead of simply relative rank. The ribbon between bars measures difference and has a helpful tooltip with additional data points. All that without much work on your part.
The Bump Chart, by contrast, has a few challenges in Power BI:
1. Can you build a DAX ranking measure that takes the place of the native ranking functionality of the Ribbon Chart?
2. The Power BI Line Chart currently can’t invert the Y Axis so that a rank value of 1 appears on top, but can you fake it?
3. The default Tooltip clearly shows the evidence of the common workaround for inverting the rank, so can you change how that displays?
Explore some of the differences between the charts in the sample below, and then try to rebuild your own version of both charts in Power BI Desktop. What are some pros and cons of both chart types?
- Use the Financials sample dataset (available in Power BI Desktop from October 2020 onward)
- Create a Ribbon Chart with a combination of Date, Country, and Sales.
- Create a DAX measure that will rank countries by sales.
- Use a combination of DAX functions SUM, CALCULATE, ALLSELECTED, and RANKX in your measure.
- HINT: Go to the DAX Guide function reference for some examples of how these functions work in general.
- HINT HINT: Expand the Solution below if you get stuck and want a sample measure. If you’ve never touched DAX before, some of these functions can seem intimidating, and we don’t want that to stop you from building a visualization.
- Add a Line Chart that includes Date, Country, and your custom sales rank measure.
- Add markers to your line chart.
- Determine a way to make your sales rank on the line chart appear like the ribbon chart. The highest rank value should be at the top of the visual and not the bottom.
- If you had to modify your rank measure to fulfill the prior requirement, be sure that rank values in the line chart’s Y Axis and default Tooltip appear as positive numbers. Use only the existing three fields and no other visuals…
Did you know that Power BI Desktop now includes a sample dataset?
This week’s challenge is based on the Financials sample available in Power BI Desktop from October 2020 onward.
After you finish your workout, share on Twitter using the hashtags #WOW2021 and #PowerBI, and tag @JSBaucke, @MMarie, @shan_gsd and @dataveld. 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.