Customer Fact sheet advanced components

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:

  • Bullet graphs
  • Sparklines

Bullet graph

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:

Bullet graph

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:

Bullet graph

Exercise 8.1

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

  1. In the Expressions tab, define each expression as a Bar in the Display Options section. Select the first expression and enable the Has Error Bars option in the Display Options section.
  2. Define the following attribute expressions for 0-70%:

    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.

  3. In the Style tab, enable the Stacked option in the Subtype section and select the horizontal bars in the Orientation section.
  4. In the Presentation tab, change the Width and Thickness to Medium in the Error Bars section.

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.

  1. In the Expressions tab, add a new expression and enter 0 into the Edit Expression window. Disable the Line option and enable the Stock option in the Display Options section.
  2. Click OK to close the Chart Properties window and open it again.
  3. Define the following attribute expressions for a new stock expression:

    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.

Exercise 8.1

Exercise 8.2

The following exercise tells you how to recreate the chart using the result of the previous exercise:

  1. Clone the chart from the previous exercise and replace the calculated dimension with Item.
  2. Replace 1 in every expression, including the Error Below and Error Above attribute expressions, with the following code:
    sum({$<$(vSetYTDModifier),_BudgetFlag={1}>} 
     [Net Sales USD])
  3. Change the Stock High attribute expression to the following expression:
    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

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.

Sparklines

Exercise 8.3

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

  1. In the Expressions tab, define OTIF as line and the other two expressions as a Bar in the Display Options section.
  2. Insert '<w.5>' into the Line Style attribute expression for OTIF.
  3. In the Style tab, enable the Stacked option in the Subtype.
  4. In the Presentation tab, set the Bar Distance and Cluster Distance to 0 in the Bar Settings section.
  5. In the Presentation tab, disable the Suppress Zero-Values option.
  6. In the Axes tab, select the expression OTIF and disable the option, Forced 0.
  7. Finally adjust the colors and hide all elements other than the lines and the background created by the bars.

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:

Exercise 8.3
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset