Both side by side bar and stacked bar charts add a second dimension based on a standard bar chart.
Tableau side by side bar dual axis.
Place region on color.
A dual axis is created automatically.
Aggregate the second axis to median too.
Create a calculation that ignores filters create a calculation that ignores filters to use as one of the axes.
In both cases we end up with a dual axis bar chart.
From that please select the dual axis option as shown below.
Convert the mark type of the second axis to bar.
As a variation of a bar chart a side by side bar chart is similar to a stacked bar chart except it puts bars side by side instead of stacking them.
We notice that tableau automatically assigns the colors by measure names.
To create a tableau dual axis chart please select the total product cost axis.
Add colors select marks sum discount.
You can left click on the green triangle and drag it to the opposite axis of the left axis on the first row.
We remove the measure names in both mark cards.
Right click sum sales and choose measure median.
To add a measure as a dual axis drag the field to the right side of the view and drop it when you see a black dashed line appear.
Select marks sum sales.
Place product sub category on color.
You can also right click control click on mac the measure on the columns or rows shelf and select dual axis.
See creating a calculation that ignores filters for directions either using the level of detail lod expression fixed or a parameter.
This is where the axis will be drawn after releasing the left mouse key.
Right click sum sales and select dual axis.
When you hover over the right side of the chart tableau will show you a dashed line.
Under marks all select bar.
Drag measure names to columns.
But stacked bar charts tend to show the part to whole relation.
When using a parameter each axis may have one null mark these marks cannot be filtered out or hidden because the null mark on one.