I'd play with it, but I would need a working example to play with.
You'll need to do a table calc to get the grand total (52%) going across, and another to compute against it. Need to mess with telling tableau how to partition and address the table calcs, perhaps where to restart, etc.
Hack up something similar (without confidential data) in an excel file and swap data sources to use that. Then post that workbook.
See detailed steps I outlined for amother person in this thread:
See Calculation2 in attached.
I did a window_sum of the row (restart every [Asset Range]) and then divide the sum of each Region by that window_sum.
To force it to restart every asset range, right click on Calculation2 in the Masure Values shelf. You can mess with the calculation directions there. By default, Tableau worked this calc running DOWN the sheet. That ends up giving you percentages within Atlanta for each asset range. Not what you need. Telling it to run across the sheet makes tableau sum up each row across (that's what WINDOW_SUM does) and then calculates for each region. So I selected Table(across) for the table calc definition. (Note, there are times that you need to tell it to take multiple dimensions into account, and that's what the ADVANCED option is for. You don't need it here, so no need to confuse things by explaining its use.)
I added the sum of [Days to Start] on the sheet too, just to demo the calc I did. (Atlanta: 809/6934 = 11.7%) I'm assuming that's the equation you really need there. A percent of a percent isn't usually meaningful. A percent of totals is.
If that's not what you are looking for, we can modify this to get the equation you need.
Percent of Grand Total 2.twbx 121.9 KB
1 of 1 people found this helpful
PS: I modified the number format of Calculation2 to show 2 decimal places. Otherwise it just showed zero for all the calcs. You can show more decimals, format it to be a percentage, etc.
I might be able to get what the client wants using what you did. Greatly appreciate it!
They do really want the percent of the grand total percent (so apercent of a percent). So Atlanta would be like 118% and so on.
Looked at it again.
Tableau is gwetting the 52.5 by doing (window_sum(sum([Days Start to Mail]))/window_sum([Count of Exams]))
So your calc would be:
AVG([Days Start to Mail])/(window_sum(sum([Days Start to Mail]))/window_sum([Count of Exams])) You get 1.18 for Atlanta that way.
Thanks a bunch.
Hope to meet you at TC in Vegas..??!!
Hope to be there.