I believe what you need to do here is to duplicate your data source and blend it with your original source by using the relationship Signup Date = Cancellation Date
Then you can draw your chart of signups per day by using the SUM(Number of Records) measure, and then you can also pull in SUM(Number of Records) again, this time from the secondary data source, to get the number of cancellations.
Please see the attached for a similar example using the superstore data -- it shows the number of orders placed vs. the number of orders shipped.
Unshipped orders.twbx.zip 714.2 KB
1 of 1 people found this helpful
It's important to note that Robin's solution only works if, given the level of aggregation used in the blend, there is a row in the primary for every row in the secondary at the given value.
So, using the example where Signup Date = Cancellation Date (which would effectively be at the day level assuming those are dates), then if there were no signups for 12 February 2013 then there would be no cancellations returned for that date, even if there were cancellations in the underlying data source. To work around this, you can:
- create a scaffold data source with all dates, then either left-join or blend each data source to that scaffold.
- use Show Missing Values on the date in the primary to force Tableau to pad out the days in the primary prior to the blend. This can be really powerful but can introduce issues
- use a UNION instead of a blend
Ah yes, a very valid point.
A UNION was actually my initial thought here, but it seemed more complicated than a blend to implement.