Loading

Create a Barbell Chart

Дата публикации: Feb 20, 2025
Задача
How to make a barbell chart. This chart is also known as a dumbbell chart, a DNA chart, or a connected dot chart.
Действия

A DNA chart can be created with a dual axis Gantt bar and Circle chart. The attached example workbook uses the example data set Superstore to demonstrate the following directions:

  1. Drag [Sales] to the Columns shelf
  2. Drag [Sub-Category] to the Rows shelf
  3. Drag [Order Date] to Color on the marks card
  4. Drag [Order Date] to the Filter shelf
  5. In the Filter Field dialog, select Years and click Next >
  6. In the Filter dialog, check only 2023 and 2024 and click OK
  7. On the marks card, in the drop-down, select Circle
  8. Create a calculated field with a name like "2024 Sales" with a calculation similar to the following:
    { FIXED [Sub-Category] : SUM
    (
    IF YEAR([Order Date]) = 2024
    THEN [Sales]
    END
    ) }
  9. Create a calculated field with a name like "Difference" with a calculation similar to the following:
    { FIXED [Sub-Category] : SUM(
    IF YEAR([Order Date]) = 2023
    THEN [Sales]
    END
    ) }
    -
    [2024 Sales]
    
  10. Drag [2015 Sales] to the Columns shelf.
  11. Click [2015 Sales] on the Columns shelf to open the SUM(2015 Sales) marks card.
  12. In the SUM(2015 Sales) marks card, do the following:
    1. In the dropdown, select Gantt Bar
    2. Remove YEAR(Order Date) from Color
    3. Drag [Difference] to Size
    4. Optional: click Size and adjust the thickness of the bar with the slider.
  13. Right-click [2015 Sales] on the Columns shelf and select Dual Axis
  14. Right-click the Sales axis at the bottom of the view and select Move marks to front
  15. Right-click [2015 Sale] on the Columns shelf and un-check Show Header

NOTE: To view the data please download DNA TWBX file

Дополнительные ресурсы
To view the above steps in action, see the video below.
Note: the video has no sound. To view the video in higher quality, click the YouTube icon below to watch it on YouTube directly.
 
Номер статьи базы знаний

001456654

Вложения

Barbell Chart.twbx

1171 KB

 
Загрузка
Salesforce Help | Article