Bar Diverging Stacked Chart Tutorial

Options

Diverging stacked bar charts, aka Likert scales, are perfect for presenting survey or questionnaire results that involve sentiment (eg disagree, neutral, agreed).

How to build in Domo

1. Start in Magic ETL:

Survey Dataset:

  1. Input tool: Survey dataset
  2. Group By Tile:
    1. Select what columns identify the grouping: Age Group
    2. Name a new aggregated column: Total Age Group Respondees
    3. Define how the new column should be aggregated: Number of respondents (Sum)
  3. Join Data Tile:
    1. Select tables and join type:
      1. Left Table: Group By
      2. Right Table: Survey Dataset
      3. Join Type: Inner
    2. Choose the matching columns (keys)
      1. Age Group to Age Group
    3. Alter output columns:
      1. Right Table: Drop column Age Group
  4. Formula Tile:
    1. Create a new column called 'PctOfTotal': CASE WHEN Response Value < 3 THEN PctOfTotal*-1 ELSE PctOfTotal END
    2. Update the column 'PctOfTotal':Number of respondents / Total Age Group Respondees
  5. Output Tile: Survey Dataset Transformed

2. Open dataset in Analyzer:

  1. Select 'Horizontal Bar' under 'Popular Charts' as the Chart Type
  2. Create Calculated Field named 'Category Sort': (CASE WHEN Response Value = 1 THEN 'I disagree a lot' WHEN Response Value = 2 THEN 'I disagree' WHEN Response Value= 3 THEN 'I agree' WHEN Response Value = 4 THEN 'I agree a lot' ELSE 'Neutral' END)
  3. Drag 'PctOfTotal' into 'X Axis'
  4. Drag 'Age Group' into 'Y Axis'
  5. Drag 'Response' into 'Series'
  6. Turn on Tooltips. Drag 'Number of respondents' into 'Tooltip Field 1'
  7. Drag 'Category Sort' to Sorting. Aggregation: No aggregation
  8. In Chart Properties, configure the following:
    1. General -> Sort on Totals: A-Z
    2. Gridlines -> 'Hide Gridlines' checked
    3. Gridlines -> 'Remove Min/Max/Avg Lines' checked
    4. Data Label Settings -> Text as %_PERCENT_OF_CATEGORY
    5. Data Label Settings -> Position: Center
    6. Data Label Settings -> 'Use Scale Format' checked
    7. Data Label Settings -> 'Use Scale Abbreviation' checked
    8. Value Scale (X) -> Show Show Label as 'Never'
    9. Hover Text Settings -> Hover Text as
🔤 %_CATEGORY_NAME | %_SERIES_NAME 
%_TOOLTIP1 respondees (%_PERCENT_OF_CATEGORY)

Screenshot: