Generally, the output of SQL in a tabular format is not very optimal information to understand and put to use. If we are dealing with textual information we need to represent information from one column against another column to have a comparative analysis. CrossTab visualization is designed for that purpose. With version 5.0 onwards we are enhancing the capabilities of crosstab visualization.
Basic CrossTab
Let us just drag one field total_cost in either of the two places (Column / Rows) and select CrossTab in Visualization from the panel to the right.
You get a single value cross tab as shown above.
Always Aggregation
By default, the value we drag to Columns / Rows is always aggregated. All numeric columns (measures) are aggregated as sum, and non-numeric columns are group by. We can remove the aggregation if need be. Let us do it for total_cost and remove the sum from aggregation and generate report again. You will notice that nothing changed.
In CrossTab, values are always aggregated and default method is same, sum all numeric and group non-numeric values.
Multiple fields
This chart is best when used with multiple level of dimensions where we need to analyze information across multiple factors. Let us drag booking_platform into columns and mode_of_payment into Rows along with sum of total_cost (in either Rows / Columns) and generate the report.
You will see the split of total_cost of travel per booking_platform, per mode_of_payment. What dimension you drag in column forms the column of crosstab, whatever dimension you drag in rows forms the rows of the crosstab and measures forms the values section.
Crosstab visualization is not limited one dimension on Columns / Rows / measures. You can add up couple of more dimensions and another measure to the mix (as per your needs) and generate the report
We have added meeting_purpose and meeting_impact as dimension and count of source_id as a measure.
You will see that we have split of the measures as per the dimension. Both the measures are running as two columns, and the dimensions are nested as per the sequence in Columns or Rows respectively.
Once you are on the chart, you can also collapse the outer dimension and see the sum of all values inside it.
Marks
Based on your screen size on the panel to right there are more options to this Visualization. If you do not see ‘Marks’ on the list, you may click on the meatball icon and select ‘Marks’.
Just like table we have option to colour or size the information based on one of the fields.
Let us use mode_of_payment for color and generate the report again.
Similarly, the size of text an be controlled the same way let us add travel_cost to size. In both colors and size right now we have dragged dimensions, in any of them you can drag dimensions or measures based on the requirement.
Based on your needs you can use these Marks options for better understanding of data.
Thank You,
Helical Insight