The Ultimate Guide to Creating Insightful Box Plots in Qlikview

Box plots, also known as box-and-whisker plots, are a powerful tool for visualizing and comparing the distribution of a quantitative variable across different categories. While histograms and density plots are great for showing the distribution of a single variable, box plots really shine when you want to compare distributions between groups.

In this guide, we‘ll dive deep into how to create and interpret box plots in Qlikview. We‘ll walk through some examples and share tips and best practices to help you get the most out of this chart type. Whether you‘re new to box plots or an experienced Qlikview developer, you‘ll find valuable insights here to level up your data visualization game.

Anatomy of a Box Plot: The 5 Number Summary

Before we get into the nitty gritty of building box plots in Qlikview, let‘s make sure we understand what a box plot is actually showing. A box plot provides a concise summary of a distribution using 5 key statistics:

  1. Minimum: The smallest value in the dataset, excluding outliers
  2. First quartile (Q1): The value below which 25% of the data falls
  3. Median: The middle value that splits the data in half
  4. Third quartile (Q3): The value below which 75% of the data falls
  5. Maximum: The largest value in the dataset, excluding outliers

The box itself spans from the first quartile to the third quartile, with a line inside marking the median. So the box contains the middle 50% of the data. Lines called whiskers extend from the box to the minimum and maximum values.

Anatomy of a box plot

Some variations of box plots will also individually plot outliers that fall more than 1.5 times the interquartile range above Q3 or below Q1. These are known as modified box plots.

The beauty of summarizing the distribution in this way is that it allows us to easily compare the range, central tendency, and skew of the distributions between multiple categories. Just plot the boxes side-by-side and look for differences in the position and size of the boxes and whiskers.

When to Use Box Plots

Box plots are most useful when you have:

  • A quantitative variable that you want to summarize and compare the distribution of
  • Across multiple categories of a qualitative variable
  • With a moderate to large number of data points in each category (at least 20-30)

Some common use cases include:

  • Comparing test scores, heights, weights, incomes, temperatures, product ratings, etc. between demographic groups, geographic regions, time periods, experimental conditions, and so on.
  • Identifying categories with unusually high or low values
  • Detecting differences in variability between categories
  • Checking for outliers and skewed distributions
  • Complementing other charts like bar graphs of the mean or median

However, box plots are less useful when:

  • You have very small sample sizes, where the 5 number summary may be a poor representation of the underlying distribution
  • You need to understand the exact shape of the distribution within each category
  • You want to show every individual data point
  • Your audience is unfamiliar with how to read a box plot

In those cases, consider using a histogram, density plot, dot plot, or strip plot instead of or in addition to a box plot.

Creating a Box Plot in Qlikview

Now let‘s get practical and see how to actually build a box plot in Qlikview from scratch. We‘ll use an example dataset of sales performance across different regions to demonstrate.

Step 1: Create a new combo chart

Right-click on a blank area of your Qlikview sheet and select "New Sheet Object" > "Chart" > "Combo Chart". In the dimensions tab, select the qualitative field you want to split the data by, in our case Region.

Step 2: Set up the expressions

In the expressions tab, we need to define the 5 values that make up the box plot. Click the + button to add 5 sub-expressions under the first main expression:

  • Box Plot Min: min(Sales)
  • Box Plot Q1: fractile(Sales, 0.25)
  • Box Plot Median: median(Sales)
  • Box Plot Q3: fractile(Sales,0.75)
  • Box Plot Max: max(Sales)

Setting up box plot expressions in Qlikview

Step 3: Customize the formatting

In the "Presentation" tab, de-select "Bar" next to the first expression and instead select "Box Plot". Optionally, add two more regular expressions for the Min and Max and set their "Representation" to dot or asterisk to show them as points.

Format the axis as needed, add titles and labels, adjust colors, etc. to make the chart polished and readable. Here‘s what the final result might look like:

Example box plot in Qlikview

Interpreting the Results

So what insights can we glean from this box plot? We can see that:

  • The South region has the highest median sales, as well as the highest individual sale. Its box and whiskers are positioned higher than the other regions.
  • The East region has the widest range of sales, with the longest whiskers. There are some low-performing and high-performing outliers.
  • The North and West regions have very similar distributions that are lower and narrower than South and East. West‘s median is slightly higher than North‘s.

Based on this, we might conclude that there are some best practices in the South region that could be shared with the other regions to help them boost sales. We may also want to investigate what‘s behind East‘s inconsistent performance and see if additional training or support is needed there.

This kind of comparative insight would be much harder to discern from a simple bar chart of the mean or median sales value by region. The box plot reveals additional nuances about the variability and skew that could be important.

Variations and Alternatives to Box Plots

Beyond the standard box plot, there are some other variations and similar chart types worth mentioning:

  • Modified box plots: As noted above, these add individual points for outliers beyond the whiskers. This provides additional information but can clutter the chart with many categories.
  • Violin plots: These are similar to box plots but add a rotated kernel density plot on each side to show more detail about the shape of the distribution. They work well for complex, multi-modal distributions.
  • Beeswarm plots: These plot every individual data point, jittered to avoid overlap. This reveals more granular information and is good for smaller datasets.
  • Sina plots: Also called split violins, these are a combination of a violin plot and a box plot, with the density plot on one side and the box plot on the other.

Variations and alternatives to box plots

Most of these can also be created in Qlikview with the right combination of chart types and expressions. Some may require using an extension like the "Advanced Box Plot" vis in Qlik Sense.

Box Plots in Other Tools

While we‘ve focused on Qlikview in this guide, box plots are a common chart type available in most major business intelligence and data visualization platforms. If you‘re working in a different tool, the process will be similar but the interface and settings may vary.

In Tableau, box plots are a standard chart type that can be created by dragging dimensions and measures to the appropriate shelves. You can adjust the calculation of the quartiles, include or exclude outliers, and format the appearance flexibly.

In Power BI, box plots are not a built-in visual, but they can be created using a custom R or Python script visual. There are also third-party box plot visuals available in the marketplace.

Regardless of the tool, the same guidelines and best practices apply for creating clear and insightful box plots. Remember to:

  • Use them to compare distributions, not show individual values
  • Label the axes and categories clearly
  • Use colors and formatting judiciously to highlight key insights
  • Include other chart types or summary statistics as needed for additional context

Conclusion

Box plots are a versatile tool to have in your data visualization toolkit, especially when working with large datasets and comparing distributions. While they may take some practice to create and interpret, they can reveal insights that other chart types may miss.

We‘ve covered a lot of ground in this guide, from the anatomy of a box plot to step-by-step instructions and examples in Qlikview. Hopefully you now feel empowered to start using box plots in your own dashboards and analyses.

Like any chart type, box plots are not a panacea and should be used thoughtfully in combination with other visualizations and summary statistics. But when used appropriately, they can be a powerful way to explore, understand, and communicate patterns in your data.

Do you have experience using box plots in your work? Have any additional tips or examples to share? Leave a comment below and let‘s continue the conversation!

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

Similar Posts