1 2 Previous Next 17 Replies Latest reply on May 5, 2016 12:12 PM by philip.watkinson

# Calculated Field and/or Table disappears in stacked or side by side bar graph

My sincere apologies if this question has been dealt with elsewhere, but I am unable to locate a concrete answer. The specific issue that I seem to be having is with the proper way to visualize a calculated field and/or table in a comparative bar chart. In this case I am attempting to show the percentage of the total population of Puerto Rico that is Low Income. So I began with two SUM measures and one dimension. Using the "Create Calculated Field" I have converted the SUM Low Income Population Total to a percentage. However, when I go to illustrate it in a stacked or side by side bar graph I can't seem to get it to show up anywhere. What am I doing wrong or what else needs to be done to create an accurate viz?

• ###### 1. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

Hi Phil,

Your axis is in units the measure that is not showing up is a percentile so I'm not sure why you would expect to see something.  You might try a dual axis graph.  That's about the best direction I could provide based on your screenshot.   By uploading a workbook or data you are making it easier and more likely for people to help you.

I think the best way to present total pop and % of low income is to have a stacked bar where the bar is the sum and the stacking represents the % of total but I have no idea if your data is structured to work that way.

Good luck,

Ivan

• ###### 2. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

Phil,  % translated to units in this case will always be less than 1, 1 being = 100%, so the percentage value is being dwarfed on the axis.  Ivan is right to  best use a dual axis with % on 2nd axis.  You can drag each of your measures from the measure values shelf to the rows shelf and then click on right measure and choose dual axis.

• ###### 3. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

OK, thank you for the prompt response. I have attached the sample file that I have been working on. Meanwhile I tried both methods but neither worked, so I am looking forward to any real solutions.

• ###### 4. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

While working on other visualizations with standard data formatting, I discovered that that side-by-side and stacked bar charts are not accurately portraying the sum totals nor the % of the total even when it is only used under the label shelf. Is anyone else having this issue or is just me? :-o

• ###### 5. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

John, I tried the method that you described above but there is no "dual axis" option in the drop-down menu.

• ###### 6. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

Philip,  You will need to put the individual measures on the rows shelf as I have done in the attached on the last tab.  I hope this helps.

• ###### 7. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

Hi Phil,

Below are a few examples of how you could use a dual axis or stacking to display both measures.

• ###### 8. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

Ivan, thank you so much for your help. This is what I get both ways :

• ###### 9. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

John, here is what I get when I attempt to open the modified workbook that you sent me

• ###### 10. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

While working with Tableau Public (the down-scaled free version), I have apparently encountered some technical limitations that are not found in Tableau Desktop. This discovery was made while doing a sample contrast between total population vs. %low income population. I have not been able to get the Low Income percentage aggregation to display properly in a side-by-side or stacked bar graph. When  I requested support from you in the Tableau Community, other Tableau Desktop users did not encounter this problem described above, even while using the exact same data base and methods. All of this leads me to believe that Tableau Public (or at least the version that I have installed on my computer) is not responding correctly.

• ###### 11. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

Hi Phil,

You've got the dual axis so you are pretty close.  Try switching the Mark Type of LOW Income % to Square or circle.

and/or edit your secondary(rightmost) axis and set the range to fixed and the fixed end to 1.

• ###### 12. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

Ivan... Thank you! Thank you! Thank you! That did the trick! You are a life saver; or as my uncle from Minnesota would often say, "you are a scholar and a gentleman!"

Now that it has been resolved, could you please take a brief moment to explain the mechanics behind editing the axis? THANKS AGAIN

• ###### 13. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

Hi Phil,

I'm glad that worked for you.  Editing the axis is quite easy.  Right click anywhere in the axis which will bring up a menu.  From the menu you just need to select Edit Axis and the to Open the Edit Axis box.  From there you can adjust the range of values on your axis.  Whenever I use a % as a measure I like my axis to go to 100% which I achieved by setting the fixed end to 1.  Having the axis go to 100% allows for the stacked bar look.  Let me know if it's not clear.

Best,
Ivan

• ###### 14. Re: Calculated Field and/or Table disappears in stacked or side by side bar graph

Yes indeed Ivan! Now, how can the same be done for a side-by-side bar chart? I get all kinds of wild inaccuracies Please see below:

1 2 Previous Next