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

Using the wizard to create a box plot chart


With a simple data set, we want to see the median (or mean) values and different percentile values across the whole data set. But quite often, we want to look for a particular dimension (for example, Month), at the median and percentiles of the totals for another dimension (for example, Country). So, rather than the median for the individual values (say Sales), which could be quite small or quite large, we want to see the median for the total value by the second dimension.

We can create this manually, but this can be achieved quickly using the Box Plot Wizard.

Getting ready

Load the following script:

LOAD * INLINE [
    Country, Value, Month
    USA, 12, 2013-01-01
    USA, 14.5, 2013-01-01
    USA, 6.6, 2013-02-01
    USA, 4.5, 2013-02-01
    USA, 7.8, 2013-03-01
    USA, 9.4, 2013-03-01
    UK, 11.3, 2013-01-01
    UK, 10.1, 2013-01-01
    UK, 3.2, 2013-02-01
    UK, 5.6, 2013-02-01
    UK, 3.9, 2013-03-01
    UK, 6.9, 2013-03-01
];

How to do it…

Use the following steps to create a box plot using the wizard:

  1. From the Tools menu, select Box Plot Wizard….

  2. On the introductory page, click on Next:

  3. Select the following values:

    Dimension

    Month

    Aggregator

    Country

    Expression

    Sum(Value)

  4. Click on Next.

  5. Select the following values:

    Display Mode

    Median

    Include Whiskers

    On or Min/Max

    Use Outliers

    On

  6. Click on Finish.

How it works…

The wizard takes care of creating the expressions that will be needed for this box plot. In this case, where there is an "aggregator"; that dimension is used as part of an Aggr expression.

There are two approaches to the box plot that can be achieved from the wizard:

  • Median mode

    • The central line is defined by the median (fiftieth percentile)

    • Top of the box is the seventy-fifth percentile

    • Bottom is the seventy-fifth percentile

    • Upper whisker is the maximum value

    • Lower whisker is the minimum value

  • Average mode

    • The central line is defined by the mean value

    • Top of the box is the Mean + the Standard Deviation

    • Bottom of the box is the Mean – the Standard Deviation

    Note

    Min/Max Whiskers may not be valid as they could lie inside the box!

There's more…

This recipe uses the AGGR function to see the average/median values of an aggregation. However, the box plot can be used for more than averages.

See also

  • The Creating a box plot chart for a simple data set 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