Show Stacked Bar and Standard Bar Chart side by side

Today's Topic is showing differnt type of Bar chart side by side.

Actullay it's easy enough, but I got some questions from my collegues.

I used Tableau's sample data from the site.

Sample - Superstore Sales (Excel).xls |Tableau Support Community

 

Let's start from this type of view.

f:id:skn_0410:20160623085209p:plain

 

What we need to do are

- Group Low height items 

- Show Stackd Bar cahrt only for Grouped Items.

 

Starting from sort by decending order.

f:id:skn_0410:20160623084522p:plain

 

We got below VIZ.

f:id:skn_0410:20160623085310p:plain

Group the items whose sales are below $500K.

There are multiple methods to do this, but I use LOD formula in this case.

[Province 2]

if {fixed [Province]:sum([Sales])} > 500000 then [Province] else "Small Sales" END

 

The function of "Fixed + Sum" is similar to  EXCEL's "SUMIF" or "SUMIFS"

{fixed [Province]:sum([Sales])} means that nevertheless of other fields value, sum up with field of "Province".

 

Let's put [Province 2] on Column shelf instead of [Province].

We got below VIZ.

f:id:skn_0410:20160623085528p:plain

Becasue we chaged dimension, need to re-sort on [Province2]

f:id:skn_0410:20160623085631p:plain

When we put [Province 2] in color shelf, it looks below VIZ.

f:id:skn_0410:20160623085733p:plain

In Tableau's settnig, Items in column and Items in Label or Color etc are not neccessarily matched easy other.

So, we put [Province]  instead of [Province 2] in color shelf.

Now we can see only [Small Sales] has Stacked Bar with different color.

f:id:skn_0410:20160623090111p:plain

 

Actually, the chart type stays same as "Standard Bar Chart", but with using different dimension as Color, you can show the standard bar chart like stacked.

 

 Rest of small things.

Let's sort color legnend's order.

f:id:skn_0410:20160623090412p:plain

f:id:skn_0410:20160623090456p:plain

And this is completed VIZ.

| Tableau Public 

f:id:skn_0410:20160624091920p:plain

OK, let's Play around and Enjoy!