Give a chestnut! Tableau Tips (105): Use a four-quadrant graph to classify and analyze data

published: 2021-06-08

The four-quadrant chart is a very common chart, and the Gartner Magic Quadrant (as shown in the figure below) is a very typical application scenario.

▼ Observing the Magic Quadrant, we can easily see the data performance of each quadrant:

The four-quadrant chart is a common method for data classification and analysis. The chart area is divided into four quadrants by horizontal and vertical dividing lines. The scatter chart is used to make the data performance of each quadrant different, so as to quickly find A set of items with common characteristics or attributes.

So, how to implement a four-quadrant chart in Tableau? Let's learn together!

In this issue of "Give a Chestnut", the Tableau technique that Ada wants to share with you is: use a four-quadrant graph to classify and analyze data.

To facilitate learning, we use the supermarket data source that comes with Tableau.

1. Connect to the supermarket data source, and then create a new calculation field profit rate:

Profit rate = SUM([Profit])/SUM([Sales])

2. Put the discount average in the column; put the profit margin in the row; then put the multi-value month in the detailed information.

 

3. Right-click the axis of discount and profit rate-select edit axis-remove the option including zero.

4. Add two constant lines to the view: the constant line on the discount axis is set to 0.11, and the constant line on the profit rate axis is set to 0.13.

 

 

5. Add the quadrant color of the calculated field and put the field into the color in the mark card.

IF [profit rate]>0.13 and AVG([discount])>=0.11 THEN ‘A’

ELSEIF [profit rate]>0.13 and AVG([discount])<0.11 THEN ‘B’

ELSEIF [profit rate]<=0.13 and AVG([discount])<0.11 THEN ‘C’

ELSE ‘D’

END

In this way, we have implemented a four-quadrant chart in Tableau. The dots representing the data fall into different quadrants according to its performance, and the colors make the chart look more intuitive.

 

In this issue of Tableau Tips, have you got it yet? Give it a try!