KNOWLEDGE BASE

How To Merge 2 Different Scatter Plots


Published: 04 Feb 2021
Last Modified Date: 05 Feb 2021

Question

How to merge 2 different scatter plots

Merge 2 scatter slots like the following:
User-added image
User-added image

into 1 scatter plot 
User-added image

Environment

  • Tableau Desktop

Answer

1. Go to Data source page
2. Drag [Orders] to the [Orders] in campus to union by itself
3. Create following calculations
X:
IF ATTR([Table Name])='Orders' THEN MAX([Discount]) ELSE AVG([Quantity]) END
Y:
IF ATTR([Table Name])='Orders' THEN SUM([Profit]) ELSE SUM([Sales]) END
4. Drag [Y] to [Rows], [X] to [Columns], [Region] to [Color], [Table Name] to [Shape]

Additional Information

For other worksheets using same data source, Please follow steps below:
1. drag [Table Name] to [Filter]
2. select 'Orders'
3. right click on [Table Name] in [Filter] > Add to context
Did this article resolve the issue?