KNOWLEDGE BASE

How To Create a Horizontal Marimekko Chart


Published: 13 Oct 2021
Last Modified Date: 14 Oct 2021

Question

How to create a horizontal marimekko chart?

Environment

  • Tableau Desktop

Answer

The following steps are demonstrated in the attached workbook, HorizontalMarimekkoChart.twbx with using the Sample- Suprestore data source.
  1. Create a data source such as SampleData.xlsx. This data source is used to build each marimekko rectangle.
  2. Click Analysis > Create Calculated Field to create a calculated field named 1. Value with the following formula.
    {FIXED [Category],[Region]:MIN([Sales])}
  3. Create a calculated field named 2. Value Total with the following formula.
    {FIXED [Category]:SUM([1. Value])}
  4. Create a calculated field named 3. % Value Total with the following formula.
    SUM([2. Value Total])/TOTAL(SUM([2. Value Total]))
    
  5. Create a calculated field named 4. % Running Value Total with the following formula.
    RUNNING_SUM([3. % Value Total])
  6. Create a calculated field named 5. %  Total with the following formula.
    SUM([1. Value])/SUM([2. Value Total])
  7. Create a calculated field named 6. % Running Value with the following formula.
    RUNNING_SUM([5. % Value])
  8. Create a calculated field named 7. Index with the following formula.
    INDEX()
  9. Create a calculated field named @X with the following formula.
    IF ATTR([Point])=1 THEN [6. % Running Value]-[5. % Value]
    ELSEIF ATTR([Point])=2 THEN [6. % Running Value]
    ELSEIF ATTR([Point])=3 THEN [6. % Running Value]
    ELSEIF ATTR([Point])=4 THEN [6. % Running Value]-[5. % Value]
    END
  10. Create a calculated field named @Y with the following formula.
    IF ATTR([Point])=1 THEN [4. % Running Value Total]-[3. % Value Total]
    ELSEIF ATTR([Point])=2 THEN [4. % Running Value Total]-[3. % Value Total]
    ELSEIF ATTR([Point])=3 THEN [4. % Running Value Total]
    ELSEIF ATTR([Point])=4 THEN [4. % Running Value Total]
    END+[7. Index]*0
  11. Place @X to columns, @Y to row.
  12. Change the mark to polygon and place Point to path, Category to colors and Region to details.
  13. Click the details icon at the left of Region on details and change it to colors.
  14. Right-click @X on columns > Edit Table Calculation.
  15. Set the table calculation as below.
    User-added image
  16. Right-click @Y on rows > Edit Table Calculation.
  17. Select 7. Index for nested calculation and set as below.
    User-added image
  18. Change nested calculation to 3. % Value Total and set as below.
    User-added image
  19. Change nested calculation to 4. % Running Value Total and set as below.
    User-added image
Did this article resolve the issue?