Slope/Bump chart in QlikView
Visualizing ranking based on a metric for a given dimension over a time period is possible in QlikView chart object. Slope or Bump chart helps visualizing data for a top n analysis and change in ranking over the time period.
The visualization below shows ranking of Product Segment over a time period of six year. The chart help us to see the ranking of each Segment every year, and increase or decrease in the ranking. The top 3 ranking has remain same over the period of time, but changes are visible for ranking between 4 to 8.
I will demonstrate creating the above visualization in QlikView app. I already loaded the sample data and the model in the app.
The Bump chart needs to two dimension and one measure. For my example, I will use the following fields for dimensions and measure :
- Year for the DimDate table as first dimension
- Segment for the DimProduct table as second dimension
- Sum(Units*[Unit Price]) to calculate Rank
Below are the steps to build the above visualization:
- Add a New Sheet object -> Chart..
- On the General Tab enter the appropriate title, and select Line chart from the Chart type. Click next to Dimension Tab
3. On the Dimension Tab add Year and Segment fields to the Used Dimension
Turn off the Label for both dimension. Click Next to Expressions Tab
4. Enter the ranking expression in the Edit Expression box and Click OK to close the box
Rank(Sum(Units*[Unit Price]))*(-1)
In the Label box enter Sales Rank
Check the Symbol and Values on the Data Points check boxes. Change the Symbol to Dots, and Line to Smooth from the drop box.
Click on the Next button to Style Tab
6. Click on the Next button to Presentation Tab
Increase the Line Width and Symbol size
Click on the next button to Axes Tab
7. On the Axes Tab, check on the Hide Axis option
On the Dimension Axis, check on the Show Grid option. Select Thick Line on the Grid Style option
Click the Next button to Colors Tab
8. Click on the Next button to Numbers Tab
Change the Number Format Settings to Integer, and change the Format Pattern to #,##0;#,##0
Click on the Next button to the Font Tab
9. Click on the Next button to the Caption Tab
Turn off any Special Icons, and Allow Minimize and Allow Maximize options
Click Finish button to add the chart to the sheet.
10. Resize the chart to improve the chart readability.
11. There is Null value in the Segment field. Right click on the chart and select Properties from the menu option.
Click on the Dimension Tab, and select Segment from the Used Dimensions. Check on the Suppress When Value is Null option and click OK to close the Chart Properties box.
12. The Legend on the right side of the chart takes spaces and it is difficult to read and check ranking for the Product Segment.
Turn it off on Presentation Tab of the Chart Property
13. The chart is readable but the Product segment legend to color is missing. Adding the Product segment value to each line will provide better information.
14. On the Expression Tab of the Chart property add a new expression as
If(Year = 2011 or Year = 2016, Segment, ‘’) and empty label
Turn off the Line option
Turn on the Values on Data Points
Click OK to update the chart
The hard coded value can be replaced with variable assigned using the Max and Min from the Year Field.
The chart organizes the Product segment ranking for the time period Year and thier changes in the position.