I had a bit of a look at this and kept running into the restriction that you can't sort or partition a table calculation by the results of another table calculation.
It would be interesting to know if Joe's bag of tricks includes any techniques which would help here (I think Joe's a bit busy, so he's not very active on the forum at the moment - so I thought I'd see if I could pique his interest).
The limitation this situation faces is not using the result of a table calc to sort another table calc. The limitation here is lack of control of the addressing sort order. This is a similar situation as Re: .Top X shows more than X values when using the color shelf
Tableau does not offer the configuration options you would need to get the results you are looking for. I highly recommend you contact Tableau support and request the ability to have multiple dimensions in the compute using side, but instead of using their concatenation for sorting, use just one dimension from the compute using for sorting. This is like the reverse of http://kb.tableausoftware.com/articles/knowledgebase/nestedsorting you want a non-nested sorting when using multiple dimensions for compute using.
I very much so like your Bar Graph sheet, I really like how you are using the multiple mark types to get the two levels of aggregation at the same time.
So here is the current workaround:
1. using the formula
TOTAL(SUM([Dollars]))multiple times with difference compute using settings to get the Product's percent at the Product-Type combination level. (this was just my first pass, thinking about this, this step and formulas could be written in a few different ways)
2. use a modification of Richard's formula (like rolling your own running_ function):
IF (ATTR([Product])==LOOKUP(ATTR([Product]),-1)) THEN PREVIOUS_VALUE(0) ELSE PREVIOUS_VALUE(0) + [Percent] END
3. Create the Table View worksheet. Notice that Period is on the Filter shelf, and not the Pane shelf, along with PR Date is using the ATTR aggregation (this works because each Product-Type combination only has a single PR Date value).
4. use the "Show Me" to create another view, scatter, stacked bar, the ones I tried have the same effect. This is currently the only known method to get the addressing sort order desired.
5. arrange the pills as on the Final View
If you wanted to include the first one over 80% as well in the top, that would likely be another formula like Richard's, but I haven't worked it out yet - I'll leave that brain teaser for you Richard :)
There is understandably a lot going on in this workbook. If I was to create a test that evaluated if someone was a Tableau expert, this would be one of the questions. It does not use all the possible concepts at play when using table calculations, but it certainly requires awareness of quite a few.
top_products_jm_edit.twbx 90.7 KB