Creating Custom Column Charts

Column charts display data using vertical bars where the length is proportional to the value of the data. There are 3 types of column charts within the tool: the basic column chart, the stacked column chart, and the stacked column % chart. Typically, we see the metric name as dim1, profile ID as the X-Axis (dim2), and then the range of values for the data on the Y-Axis. Our guide on using the QQL Console is recommended before moving on.

Let’s take a look at an example of each kind of column visualization. We’ll be working with the same data in all the charts, but displaying them differently in each. In all 3 visualizations, we want to analyze the new Facebook reactions for the profiles: Love, Wow, Haha, Sad, & Angry.

Creating a basic column chart

For this basic column chart, we will be looking at the total number of new Facebook Reactions. To do this, we simply sum up the columns for each reaction from the facebook table. Be sure to select 'Column Chart' as the visualization type. 

The QQL Code will look as follows:

SELECT 'Reactions' AS dim1, profileId AS dim2, (ownPostsLove + ownPostsWow + ownPostsHaha + ownPostsSad + ownPostsAngry) FROM facebook

Total Reactions Excl. Likes - Fast Food - 10-15-2016 to 11-14-2016.jpg

As you can see, the chart displays the total value from our calculation we have in the QQL code. Wendy’s garnered the most new reactions, while Burger King saw the least.

Creating a stacked column chart

Stacked column charts are good to use when you want to visualize multiple values for each profile. When writing the QQL Code, you simply need to add a UNION query for each metric you want to analyze. Be sure to select 'Stacked Column Chart' as the visualization type. 

Unlike our previous example where we summed up the different reactions, we now will have each reaction in its own query, joined by UNIONs.

The QQL Code will look as follows:

SELECT "Love" AS dim1, profileId AS dim2, ownPostsLove FROM facebook UNION SELECT "Wow" AS dim1, profileId AS dim2, ownPostsWow FROM facebook UNION SELECT "Haha" AS dim1, profileId AS dim2, ownPostsHaha FROM facebook UNION SELECT "Sad" AS dim1, profileId AS dim2, ownPostsSad FROM facebook UNION SELECT "Angry" AS dim1, profileId AS dim2, ownPostsAngry FROM facebook

Reactions Excl. Likes Breakdown - Fast Food - 10-15-2016 to 11-14-2016.jpg

Now we are seeing the new reactions broken down by each type of reaction. By hovering over the bars, you can see the different values for each reaction per profile. For example, Wendy’s garnered more Wow reactions than the other profiles at 1,692.

Creating a stacked column % chart

While stacked column charts show the actual numbers of each metric, a stacked column % chart displays the percentage each metric makes up of the total per column. The sum of the bars in each column will always add up to 100%. Be sure to select 'Stacked Column Percent Chart' as the visualization type. 

The QQL Code remains unchanged from the previous example:

SELECT "Love" AS dim1, profileId AS dim2, ownPostsLove FROM facebook UNION SELECT "Wow" AS dim1, profileId AS dim2, ownPostsWow FROM facebook UNION SELECT "Haha" AS dim1, profileId AS dim2, ownPostsHaha FROM facebook UNION SELECT "Sad" AS dim1, profileId AS dim2, ownPostsSad FROM facebook UNION SELECT "Angry" AS dim1, profileId AS dim2, ownPostsAngry FROM facebook

Reactions Excl. Likes Breakdown % - Fast Food - 10-15-2016 to 11-14-2016.jpg

Here we see that all columns go up to the 100% mark. If we hover over the Wow bar again for Wendy’s, it will show both the raw value of 1,692 posts, as well as the percentage of the total new reactions, 10.1480%.

Conclusion

So what have we learned today? Basic column charts are simple, yet effective, visualizations to compare a single metric between profiles. Stacked column charts allow us to analyze the raw values of multiple metrics between profiles, while stacked column % charts allow us to analyze those same metrics but normalized. Once you know what data you wish to visualize, you can decide which of these charts would best display that information.

Still need help? Contact Us Contact Us