Creating histograms

Histograms show counts or density of a measure, which is then discretized (binned) to make counting meaningful. They are best used to observe the distribution of the measure. They are sometimes confused with plain bar charts, which can be modified to show counts but usually encode the measure value as the length of the bar.

Getting ready

Let's use the sample file, Sample – Superstore Sales (Excel). Open a new worksheet and select Sample – Superstore Sales (Excel) as the data source.

How to do it...

Once the data is loaded, perform the following steps to create a histogram:

  1. Drag-and-drop Profit (bin) from the Dimensions pane into the Columns shelf.
  2. Drag-and-drop Number of Records from the Measures pane into the Rows shelf.
  3. You should see SUM(Number of Records) in the Rows shelf now and also a histogram with a very narrow distribution, as shown in the following screenshot:
    How to do it...

How it works...

Histograms are very effective charts in observing the distribution of the measure of interest; however, sometimes the distribution is quite skewed or centered at one range or position, and in such cases rebinning (creating different bins is covered later in Chapter 6, Calculating User-defined Fields, in the Discretizing data recipe) assists the reader in observing the detailed distribution or uncovering some patterns.

..................Content has been hidden....................

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