An on-line library for creating different chart types in Tableau

Comet Chart

Tableau Canvas Layout:

Comet chart shows how a measure for one period compares with a previous period. The chart represents shape of a comet, hence the name. It usually has one to two Dimensions on Rows and at least one Measures on Columns.

Data Set: Sample Superstore Dataset

Building a Comet Chart

Opening the Superstore dataset

   Move Category, Sub-category to Rows and Sales to Columns
   Drag Order Date to Filter shelf and filter out 2018 and 2019    Change Marks card to Line. Move Order Date (choose Year) to Path
   Duplicate Order Date and move it to Size. This will expland the line chart and make it look like a comet

You should now have a view that looks like this:

Formatting the Color

Now we finished creating the chart. We still need to format its color to show the difference between year 2016 and 2017.

Create a calculated field:
   Calculated Field: Coloring
   Formula: LOOKUP(SUM([Sales]),0)-LOOKUP(SUM([Sales]),-1)

Drag Coloring to Color. This calculation means taking SUM([Sales] of current period and subtract the SUM([Sales] of previous period.
You now should have a Comet Chart that looks like this:

Related Material:

Showing now versus then? Consider a Comet chart by Steve Wexler
Tadpole Chart

Return to the chart gallery