You are on page 1of 3

Creating a Histogram in Access

A Histogram is essentially a visual representation of a frequency distribution a kind of analysis that categorizes data based on the count of occurrences where a variable assumes a specified value attribute. Although most Excel users think of Access as simply a place to store data, I often encourage building analyses, like histograms, directly in Access. I have tons of thoughts on why Access should be incorporated in these types of analyses, but Ill go into all that later. For now, Ill show you an easy way to create a histogram in Access.

Step 1: Create the Frequency Distribution


Obviously, the first step in creating a histogram is to build a frequency distribution. In Excel there are several tools provided for this purpose. In Access, you have the PARTITION function. The PARTITION function identifies the particular range in which number falls and returns a Variant (String) describing that range.

There are four required arguments: PARTITION(Number, Range Start, Range Stop, Interval)

Number: The number you are evaluating. Range Start: The start of the overall range of numbers. Range Stop: The overall range of numbers. Interval: The span of each range in the series from Range Start to Range Stop.

So step one is to create a Query that applies the PARTITION function appropriate to your analysis. As you can see in the query shown here, we are using the Partition function to evaluate the Revenue field, starting the series range at 500, ending the series range at 100,000, and setting the range intervals to 5,000.

Creating a Histogram in Access

Running this query, allows us to analyze how many employees fell into each range of dollar sales. As you can see, the Partition function gives us a relatively easy, one-query, method of creating a frequency distribution.

Step 2: Switch to PivotChart View


While in query Design View, go to the Design tab and select View > PivotChart View.

Creating a Histogram in Access

Within a few seconds, Access will run your query and return the results into chart form.

You might also like