1
votes

I am using Tableau to create a productivity progress bar of actual work done, versus the goal for that day. I have gone through numerous resources, but none seem to apply to only using 2 measures, basically putting the actual data measure turned into a percent within the goal measure. I have the chart working by using a calculated field of Missed Goal ([Goal]-[Actual]) but I am wanting into to look like a 100% stacked chart. Here is a picture of what I have, I just can't seem to get the last step expanding the bars horizontally to be a %100 chart:

Currently looks like: enter image description here

Wanting it to look like: enter image description here

Thank you for any help!

1
Can you post a picture of what you want it to look like? Also, have you tried clicking on the "Show Me" at the top right and selected 100% chart?wavery
Added the chart that I am wanting it to look like. And Tabluea doesn't have a 100% option in the "Show Me".Bryce Sinclair

1 Answers

2
votes

This is a good candidate for a few LOD Calculated Fields.

I will give an example based on the SuperStore dataset where [Profit] is a percentage of [Sales]. This can be extrapolated to your use case.

Because you have two dimensions on the view, both will be needed to be accounted for in the LOD calculations below:

//LOD Sales
{Fixed [Segment], Year([Ship Date]): SUM([Sales])} / {Fixed [Segment], Year([Ship Date]): SUM([Sales])}

We will always want [LOD Sales] to equal 1 for bar-chart display purposes.

//LOD Profit
{fixed [Segment], Year([Ship Date]): SUM([Profit])} / {Fixed [Segment], Year([Ship Date]): SUM([Sales])}

This will create the percentage of [Profit] to [Sales].

From there, you'll want to turn off Stack Marks so the bars overlap eachother:

Analysis Menu > Stack Marks > Off

And probably change the axis display to a percentage:

Right click [Measure Values] > Default Properties > Number Format > Percentage 

For simplicity, your existing filters should be placed 'On Context' as to not interfere with the LODs. (Please read above linked article for reasoning and alternatives.)

Right click on Filtered Field > Add to Context

The end result should look like this:

enter image description here