Thanks for the quick reply.
To clarify the problem a bit more, I intend to see the SUM(Sales) only as a reference line and not as a mark/chart. I don't intend to see the 'circle' as the marks.
If I change the calculation on the reference line to SUM(Sales) it changes my chart. Please see the image attached.
Suraj -- I'd like to understand your need better. Are you saying that you want to have Sheet1 look like the left side of your dashboard screenshot, but also have three lines superimposed on that chart where your three SUM(sales) are on the left side of your dashboard?
Trying to put them both together on the same chart makes the two axes step on each other, and I think the table calcs have something to do with that.
Here are some other things I tried.
In Sheet 1 I made a separate table calc called [Sum Sales] that does the window sum of the sum(sales) so that you get the three values per [Segment]. (You'll notice that I have commented out some stuff in that calc. Initially I had [Category] on the detail shelf got the [Sum Sales] mark, and so I was getting three identical "copies" of the value, one for each category, so I told the calc only to display for the first one. But then I realized I could yank [Category] off the detail shelf for that mark, and the INDEX() stuff became moot. It doesn't break anything, but it's not needed.)
Anyway, I have two separate table calcs on ROWS in Sheet 1.
In Sheet 5 I made it dual axis. (I think this is the approach you're going to have to take, BTW, so I'm still driving this with a Dual Axis solution.)
Now see Sheet 6. I changed the mark type for [Sum Sales] to shapes. I just chose one of the stock shapes, but you can create an actual line if you want. This approximates what you are looking for.
Back to the table calcs and reference lines stepping on each other, take a look at Sheet 7. Here I made a reference line on the axis for [Sum Sales] that us the SUM(sales). Notice that Tableau totals up all three Segments for the reference line. But click on an individual one, line Consumer. Now the reference line drops to the value for that individual segment. So in a convoluted way it's doing what you are looking for, but not in a way you probably want to see it.
Maybe the "Shapes" approach in Sheet 6 will serve your purposes. Let me know what you think.
Book1 B.twbx 530.7 KB
Thank you all for replying to this.
Mahfooj: Thanks. This is exactly what I am looking for. I think it's a bit tedious than I was hoping, but it gets my work done. I wish there was an easier way.
Devansh, Sayali: Thanks both for your suggestions. It isn't quite what I was looking for.
Joe: Thanks for the different attempts and the detailed explanation. Apologies if I wasn't super clear in my explanation. I was looking for the exact same output as Mahfooj has suggested. I do like your approach of using shapes and I could just replace the arrow with a line, but unfortunately it still wouldn't be on the top of the bar like I want. You may have already got an idea from Mahfooj's image, but if it helps clarify, I do want to use the Table Calc (Table Down-% of total) for all my bars. Thus all bars will be of the same height. On top and only on top of each bar, do I want to see the labels or reference line for Sum Sales in each segment.
Thank you all for working on this.