Column Chart

A column chart is a data visualization where each category is represented by a rectangle, with the height of the rectangle being proportional to the values being plotted. The column charts are of two types.

  • Basic Column Chart

  • Stacked Column Chart

In QMetry, the Advance SQL Query provides an ability to generate both the charts as with the required values; let’s understand how both types of column chart can be generated by writing a SQL queries in detail.

Basic Column Chart

Let’s take an example of a basic Column Chart report.

Report : Generate a chart that displays the Count of the test cases by their assignees.

Count Of Test Cases By Assignee

SELECT COUNT(testexecutions.testcaseID) as "Testcase Count", AssignedTester.userAlias as "Assignee" FROM testexecutions JOIN users as AssignedTester ON testexecutions.assignedTester = AssignedTester.userID WHERE testexecutions.projectID in (`@filter.project`) GROUP BY testexecutions.assignedTester

Apply the Filter

Query Output

By default, it gives you output in tabular format. You can modify the output format by switching to the available chart types from the table. In our case, we will switch it to the Column Chart.

You can adjust the Columns based on the requirement to X-Axis, Y-Axis and Cross Tab.

  • X-axis always holds a single Test entity field with any value.

  • Multiple Test entity field on Y-axis creates a stacked chart; Y-axis always contain fields with numeric values.

Once you get your desired report, you can save the report as a Gadget by clicking on the Add Gadget button.

Once you save the gadget, it will be available in the QMetry Custom Gadget section > My Gadget tab.

Stacked Column Chart

Let’s take an example of a Column Chart report.

Report : Generate a chart that displays the Count of the test case execution per release in a project (i.e. Count Of Test Case Execution Per Release)

SQL Query

Count Of Test Case Execution Per Release

SELECT testexecutions.releaseName as "Release Name", testexecutions.tcExecutionStatusName "Exec Status", COUNT(1) as "Execution Count" FROM testexecutions WHERE testexecutions.projectID in (`@Filter.project`) AND testexecutions.tcExecutionStatusName NOT IN ("Not Run") GROUP BY testexecutions.releaseName, testexecutions.tcExecutionStatusName

Apply the Filter

Query Output

By default, it gives you output in tabular format. You can modify the output format. You can switch to the available chart types from the table. In our case, we will switch it to the Column Chart.

You can adjust the Columns based on the requirement to X-Axis, Y-Axis and Cross Tab.

  • X-axis always holds a single Test entity field with any value.

  • Multiple Test entity field on Y-axis creates a stacked chart; Y-axis always contain fields with numeric values.

  • Cross tab field will help to create a Group Stacked chart.

Once you get your desired report, you can save the report as a Gadget by clicking on the Add Gadget button.

Once you save the gadget, it will be available in the QMetry Custom Gadget section > My Gadget tab.