Yes that's very similar to what I'm looking for. Thank you!
I have been working with Tableau for a little while and have had luck making some fairly good visualizations of data. I ran into a similar problem. It is beyond frustrating to make a stacked bar chart in tableau off of a fairly simple data set. I could do it in excel in 5 minutes but Tableau does not seem to want to allow me to stack media spend by month.
Tableau's approach to stacked bars is definitely different from Excel, and has some dependencies on the shape of your data. A stacked bar chart can be done as quickly as two click+drag operations, or require some reshaping of the data. If you post some sample data and a packaged workbook, I'm sure someone can help.
I am having difficulty creating a stacked bar chart. I know it would be helpful to post the data but unfortunately I allowed to so I will describe it best I can.
I have a column field that contains a branch ID (of which there are only 4) and then column fields which contain the revenue from each product (a new field, thus column, for each product). So for each record I have a branch ID and then the total revenue from each product being sold.
What I want is a stacked bar chart which is separated by branch (giving 4 overall columns) with the total revenue from each product stacked within that column. So I can see the total revenue from each branch and then how that is broken by product.
Now what keeps happening is that Tableau will break out the data into a new chart for each product and will stack the branches. Now for the life of me I can't seem to switch it around or generate the stacked bar chart as described above.
This seems like a very simple ask of Tableau so I am surprised at how difficult it is when it would be a simple case ask of excel.
Any help would be gratefully appreciated.
OK so I have worked it out now that you need to create a side-by-side bar chart and then drag "measures names" to the "color" mark. However, this seems like a bit of a convoluted way to get there. Is there a better way?
Also, is there a way to have stacked bar charts appearing next to each other but by column? The data is stored in a flat excel file with a field for each current product sale and predicted product sales. So it would be stacking the sum, by branch, of each product sales and then placing this stacked bar next to the stacked bar of sum, of the same branch, of each predicted product sales.
Where the bars go current sales for branch 1, predicted sales for branch 1, current sales for branch 2, predicted sales for branch 2, and so on.
Then they are broken down by individual product type. It is a little bit of a fiddle in excel so hoping tableau will make it easier.
Without some sample data it is impossible to give you exact advice. In general, Tableau prefers "tall" data (lots of rows) to "wide" data (lots of columns). Another general rule of thumb is that if a view is hard to build in Tableau, then you probably need to look at how your data is shaped.
To me, a couple of data layouts that would easily get to what you want would be one row per branch/product, with columns for predicted & current. Then the chart would be built with Branch on Columns, Measure Names on Columns, Measure Values on Rows, and the Product on Color. Alternatively, one row per branch/product/(predicted sales or current sales) with a dimension that that indicated whether the row was for predicted sales or current sales, then you'd have the Branch and the Sales Type dimension on Columns, the Sales on Rows, and the Product on Color.