Combined chart

A combined chart is a visualization type that consists of layers. Each layer is represented with its own chart type. You can combine linear charts, column charts, and area charts.

Features:

  • The X axis is common for all layers.
  • You can add, delete, and rename layers, as well as change their order.
  • Each layer is executed with a separate query in the database.
  • The number of layers is unlimited.

Note

  • There is no color fill by measure in column charts.
  • In a combined chart, sorting only applies to the layers it is supported for.

A combined chart is often used for plan/actual comparison. You can represent the plan as a dashed line on the layer with a linear chart, while categorizing columns with actual values on the layer with a column chart.

combo-line-column

Source table
YearCategoryPlanSales
2018Household cleaners435.53449
2018Household goodsnullnull
2018Home appliancesnullnull
2019Household cleaners503255512282
2019Household goods14575021483733
2019Home appliances2237228.42331805
2020Household cleaners16231241644668
2020Household goods44954484535567
2020Home appliances6711462.87046605
2021Household cleaners26861342737436
2021Household goods77943107836228
2021Home appliances11329663.611910983
2022Household cleaners25120312652918
2022Household goods70131457382385
2022Home appliances1132709211461881

It's sometimes convenient to use a combined chart for same-type layers. For example, when one layer represents sales by category and another one shows the plan constant.

combo-constant

You can display additional lines calculated using window functions or LOD functions. For example, to calculate an average by category, use this formula: avg(SUM([Sales] INCLUDE [Category])).

combo-avg

Sections in the wizard

Section
in the wizard
Description
XDimension. Only one field can be specified. This dimension is usually a date. In this case, make sure that the Date data type is specified for this field in the dataset. This is required for correct sorting and signature display. For better visualization, you can group dates into weeks, months, and years (to learn more, see Field settings). The X section is common for all layers.
Layer sectionLets you add, delete, and rename layers, as well as change their order. You can select a chart type for a layer: linear chart, column chart, or area chart. A list of other sections depends on the layer chart type you selected.

Creating a combined chart

To create a combined chart:

  1. On the DataLens home page, click Create chart.

  2. Under Dataset, select a dataset for visualization.

  3. Select Combined chart as your chart type.

  4. Drag a dimension from the dataset to the X section. The values are displayed in the lower part of the chart on the X-axis.

  5. Select a layer chart type: linear chart , column chart , or area chart . Rename the layer, if required.

  6. Create a chart of the appropriate type:

  7. Add a new layer. To do this, click to the right of the layer name.