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.
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.
Next, cahnge company B's field to Line chart.
Then, synclonize seconsary axis. simply use "Edit Axis".
Replace Label and change the text format.
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
We put this field on secondary axis with overwritng existing field.
We sunclonize secondary Axis.
What ???!!!
.
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.
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.
Great, it's automatically synclonized and check box is also editable.
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!