Now that we've discussed the business story behind the customer fact sheet, let's review the different visualizations that compose it. We aim to create this perspective in the most precise way possible, so each one of the Post-it notes in our design will be separate objects. The labels and the numbers will be text objects that we align using the design grid tool that we introduced in Chapter 2, Sales Perspective.
In the next sections, we will review the following, more advanced components:
The bullet chart was invented by Stephen Few to replace the bloated gauge chart in an information dashboard. Its compact design allows us to insert more information into a single view. The following bullet graph definition is from Mr. Few's website (https://www.perceptualedge.com/articles/misc/Bullet_Graph_Design_Spec.pdf) and you can read more about their use in his book Information Dashboard Design:
We can find an excellent, easy-to-use bullet graph made by Stefan Walther in Qlik Branch (http://branch.qlik.com/#/project/56728f52d1e497241ae6980a). There are also a few means to create a bullet graph using native QlikView objects. Let's explore one way that uses a single object. Before beginning the exercise, let's import this chapter's exercise files into the QDF as we did in Chapter 2, Sales Perspective. The following bullet chart compares actual sales YTD against the budget YTD:
In 1.ApplicationCustomerFactSheet_Sandbox.qvw
, let's create the following combo chart:
Dimensions | |
---|---|
Label |
Value |
<Empty> |
='Actual Sales vs. Budget YTD' |
Expressions | |
Label |
Value |
0-70% |
.7 * 1 |
70-90% |
.2 * 1 |
90-110% |
.2 * 1 |
Attribute Expressions | |
---|---|
Label |
Value |
Error Above |
(-.7 * 1) + 1 |
Error Below |
(.7 * 1) - 1 |
The Error Below formula can be confusing because the result is subtracted from the top of the bar in order to calculate the beginning of the error line. For example, if Error Below were .1
, then the error line would start .1
below the top of the bar and, if it were -.1
, then the line would start .1
above the top of the bar. Therefore, we first add the bar expression (.7
) and then subtract 1 so that the result (-.3
) will cause the error line to begin .3
above the bar. The Error Above calculation results in .3
so the error line also ends .3
above the bar. When the Error Below and Error Above are the same, then a line is drawn across the width of the bar.
The next series of steps involves a trick to create a Stock expression. Stephen Redmond explained how to add a Stock expression in his book, QlikView for Developers Cookbook. Before we begin, click OK to close the Chart Properties window and open it again.
Attribute Expressions | |
---|---|
Label |
Value |
Stock High |
sum({$<$(vSetYTDModifier),_ActualFlag={1}>} [Net Sales USD])/sum({$<$(vSetYTDModifier),_BudgetFlag={1}>} [Net Sales USD])
|
Stock Low |
0 |
The only fault in this native, one-object bullet graph is the inability to change the width of the line that encodes the performance measurements. We increase the chart's readability by organizing the chart's Color tab so that the qualitative ranges are very light and the stock line is black.
The advantage of a one-object bullet graph is that we can easily modify it into a series of bullet graphs that are based on absolute values. The following chart allows us to compare how our sales are performing against the budget in both relative and absolute terms by item. We can easily create this by using the result of the previous exercise.
The following exercise tells you how to recreate the chart using the result of the previous exercise:
sum({$<$(vSetYTDModifier),_BudgetFlag={1}>} [Net Sales USD])
sum({$<$(vSetYTDModifier),_ActualFlag={1}>} [Net Sales USD])
We now have an excellent alternative to using an extension or overlaying two charts when we create a bullet graph in QlikView. We place the single bullet graphs in the customer fact sheet and open the more detailed ones when the user clicks on that performance indicator. Next, let's review how to create sparklines for our fact sheet.
Sparklines are small, high-resolution graphs that allow users to understand the general trend of a performance indicator. A sparkline can be a line, a bar, or a win/loss chart, and they are drawn without any axes. We can easily create sparklines in a QlikView table using the Mini Chart Representation in the Display Options section. However, we may occasionally want to create a sparkline from a more customizable QlikView chart object.
In the following sparkline, we can review the percentage of deliveries that were OTIF over the last twelve months. Along with observing the performance indicator's trend, we can also appreciate how often the percentage of perfect deliveries fell below two different ranges. The top, dark-colored range is our preferred target, while the next light-colored range is our minimally acceptable range. Any point below these ranges is unacceptable.
Let's create the following combo chart:
Dimensions | |
---|---|
Label |
Value |
Delivery Year-Month |
DeliveryYear-Month |
Expressions | |
Label |
Value |
OTIF |
sum({$<$(vSetRolling12Modifier) ,_FactType={'Sales Process'} ,[Delivery First Step]={'No'}>} if([Delivery Document Date]<=[Order Due Date] and [Order Quantity] =rangesum([Delivery Quantity] ,-[Return Quantity]),1))/count({$<$(vSetRolling12Modifier) ,_FactType={'Sales Process'} ,[Delivery First Step]={'No'}>} DISTINCT [Delivery Line No.]) -1
|
90-100% |
-.1
|
80-90% |
-.1
|
'<w.5>'
into the Line Style attribute expression for OTIF.We may also add context to the primary sparkline by adding a second sparkline within the same two-dimensional space. We must be careful to give users more data without distracting their attention from the main information. We do this by making the second line lighter and transparent so that it will never overlap the first. In the following example, we compare this year's actual sales with last year's sales in the same sparkline: