What?? Why Cannot Synchronize Dual Axis

Keep talking about Dual Axis Chart

We want to create the cahrt to compare compnay to company.

 

At first, create the calculated field for comp,any A only sales.

[Sales (=Company A)]

sum(if[Company]="A" then [Sales] end)

 

To create Company B's field just after "A", using duplicate function helps you.

f:id:skn_0410:20160224095622p:plain

f:id:skn_0410:20160224095722p:plain

f:id:skn_0410:20160224095817p:plain

f:id:skn_0410:20160224095852p:plain

Now we have Compnay A's field and Compny B's field respectively.

Now, let's put Company A's field into primary axis and Company B's field into secondary axis.

f:id:skn_0410:20160224100229p:plain

f:id:skn_0410:20160224100332p:plain

f:id:skn_0410:20160224100402p:plain

Next, cahnge company B's field to Line chart.

 

f:id:skn_0410:20160224100502p:plain

f:id:skn_0410:20160224100534p:plain

Then, synclonize seconsary axis. simply use "Edit Axis".

f:id:skn_0410:20160224100619p:plain

f:id:skn_0410:20160224100653p:plain

f:id:skn_0410:20160224100734p:plain

 

Replace Label and change the text format.

f:id:skn_0410:20160224101211p:plain

 

f:id:skn_0410:20160224101305p:plain

f:id:skn_0410:20160224101342p:plain

f:id:skn_0410:20160224101413p:plain

I made it !!

Then Next, Let's compare Company A and other company's average.

Start from creating other Company's averatge field.

 

[Sales (<>Company A)]

sum(if[Company]<>"A" then [Sales] end)/2

f:id:skn_0410:20160224101624p:plain

We put this field on secondary axis with overwritng existing field.

f:id:skn_0410:20160224101713p:plain

We sunclonize secondary Axis.

What ???!!!

 

f:id:skn_0410:20160224101821p:plain.

The check box is grayed out!.

Shall I us "Fixed" value ?? No No, it's not elegant.

I could do it a few minutes ago and why suddenly cannot?

What's the difference??

Yes, it's dicimal

Tableau's each field has own "category" like date , text or number etc.

f:id:skn_0410:20160623102144p:plain

The numebr has two cagegories of Integer and Float.

If the field has dicimal, it's recognized as "Float".

And we cannot synclonize Integer Fields and Float Field.

This is not related to how the fields looks, but related to the content itself.

I mean we need to change the formula itself to align the category.

[Sales (<>Company A)]

int(sum(if[Company]<>"A" then [Sales] end)/2)

Now let's try it again.

f:id:skn_0410:20160224102447p:plain

Great, it's automatically synclonized and check box is also editable.

f:id:skn_0410:20160224102551p:plain

As a take away, when you have trouble to synclonize dula axis, you may have different category field. After cahnging the category of field, you can synclonize the dual axis.

 

OK, Let's play aroudn and Enjoy!