Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QlikView for Developers Cookbook

You're reading from   QlikView for Developers Cookbook Take your QlikView training to the next level with this brilliant book that's packed with recipes which progress from intermediate to advanced. The step-by step-approach makes learning easy and enjoyable.

Arrow left icon
Product type Paperback
Published in Jun 2013
Publisher Packt
ISBN-13 9781782179733
Length 290 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Stephen Redmond Stephen Redmond
Author Profile Icon Stephen Redmond
Stephen Redmond
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

QlikView for Developers Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Charts 2. Layout FREE CHAPTER 3. Set Analysis 4. Advanced Aggregations 5. Advanced Coding 6. Data Modeling 7. Extensions 8. Useful Functions 9. Script 10. Improving Performance 11. Security Index

Creating a modified bullet chart in a straight table


The main components of a bullet chart (from Stephen Few's perceptualedge.com) are as follows:

  • A text label

  • A quantitative scale along a single linear axis

  • The featured measure

  • One or two comparative measures (optional)

  • From two to five ranges along the quantitative scale to declare the featured measure's qualitative state (optional)

The "traditional" approach is to have bar representing the feature measure and a line representing the comparative measure. However, as long as we have two separate representations, the bar is not absolutely necessary.

In this recipe we will present a modified bullet chart using an inline linear gauge in a straight table. This allows users to view the results across all the values in a dimension.

Getting ready

Load the following script:

LOAD * INLINE [
    Country, Sales, Target
    USA, 1000, 1100
    UK, 800, 1000
    Germany, 800, 700
    Japan, 1000, 1000
];

How to do itā€¦

Follow these steps to create a straight table with a modified bullet chart:

  1. Create a new straight table. Set the dimension to be Country. Add three expressions:

    Sum(Sales)
    Sum(Target)
    Sum(Sales)/Sum(Target)
  2. Change the representation of the third expression to Linear Gauge.

  3. Click on the Gauge Settings button and enter the following settings for the gauge:

    Guage Settings, Max

    1.5

    Indicator, Mode

    Show Needle

    Indicator, Style

    Arrow

    Show Scale

    Off

    Autowidth Segments

    Off

    Hide Segment Boundaries

    Off

    Hide Gauge Outlines

    On

  4. There should be two segments already there. Configure these settings:

    Segment 1, Lower Bound

    0.0

    Segment 2, Lower Bound

    1.0

  5. Set the color of both segments to be the same. I usually go for a light gray.

  6. Click on OK. Click on Finish to close the chart wizard.

  7. The modified bullet chart should appear in the straight table.

How it worksā€¦

Because we are calculating a percentage here, it is valid to use the same gauge for each dimension (which would not have been valid in a straight table for absolute values).

By using two segments in the linear gauge, the border between them, which we have set to 1 = 100%, presents as a line. This is our target value. The needle of the gauge displays the percentage of sales versus that target.

The user can quickly scan down the table to see the better performing territories. This field is also sortable.

There's moreā€¦

Using linear gauges in straight tables can be a great way of visually representing data. It is worth playing around with.

See also

  • The Creating a Stephen Few bullet chart recipe

  • The Creating a bar chart in a straight table recipe

  • The Creating a Redmond Aged Debt Profile chart recipe

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image