Continuous or Categorical? This is the question!
You may have heard these words a lot. But what do they mean? And why their meanings are important? Everything is about importance! But keep in mind that we are talking about independent variables (dimensions). Facts are not considered in this topic at all.
Continuous data has 3 important characteristics:
Any data which doesn't have the above characteristics is considered categorical. If we think deeply about the above characteristics, we find that they are all dependent on each other, i.e. if a dimension doesn't have one of them, it cannot have the others (there may be very rare cases to which this doesn't apply and I'm not aware of). This is an "all or none" case.
领英推荐
Now, let's see how the above characteristics affect our visual selections. You have to use line/area/scatter charts when you have a continuous dimension. Why? Because you are going to show a "trend" of something which depends on that dimension (e.g., sales by date). Only line and area chart's X axis complies with continuous nature of data (scatter chart complies too, but I'm not going to discuss it as it is very complex). You have order and continuity, so you cannot use a visual which has intrinsic visual gaps (like bar or column charts). Pie chart, donut chart and tree map are not compatible with these characteristics. They don't comply with a "start" and an "end" nature of continuous data.
You SHOULD NOT use line/area/scatter charts when you have categorical dimensions (In fact you cannot use them on X and Y axis of scatter chart at all). As I told before, line/area charts are meant to display a trend. Suppose that you are going to display cities on X axis. Can you analyze sales by moving from one city to another?! Does it make sense that sales increases when you move from City1 to City 2 to City3?! There is a huge chance that you are thinking about something other than cities themselves if your answer is yes. Maybe the difference between cities is their temperature in a specific season and you are talking about a product which is more sold in cold weather compared to hot weather (like jackets). If this is the case, then you should change your dimension to temperature, ignore cities and display a line chart; or create a heat map for cities and display it side-by-side with your line chart. We always talk about comparison when dimension is categorical, e.g. which city has had most sales and which has had lowest sales, or which cities have had sold above a specific target (constant line in Power BI). Categorical dimensions are perfect for legend, e.g. in pie chart, donut chart and tree map. If you have cities, map visual (don't confuse it with tree map) can be a perfect solution in some cases.
Let's use the correct visual! Please let me know your comments on this article.