Upload a packaged workbook. Someone will show you how to do it. But it takes a hands-on (at least for me) to do that.
Sheet 2 is a copy of your original. I created a new calc: [Sum of medial paid wage]. Added it to the sheet and put it in the tooltip. This is a table calc. Notice that I specified how this will calculate along the table. Right click on the triangle of the pill for this calc in the data shelf. You'll see that I did "advanced" for the "Compute Using". Click on that pulldown and select Advanced again. You'll get a new edit box. you'll see that I included all the dimensions that are on the sheet, with [Job Title] listed first. Click OK. Now choose the pulldown for "Restarting every". Your only choice is [Job title] . It's there for you because it's at the top of the list in the previous edit box.
So what this calc is doing: Sum up all the MEDIAN(Paid Wage..) down the visa bars, and go back to zero each time we get to another Job title. you'll see in the tooltip that there is a sum that is consistent for all colors within each job title. I put this here just for demonstration purposes. You don't have to have this visible to the user in your final product.
Then I did a copy of sheet 2 to sheet 3. I made a new calc that divides each median(paid wage) by the table calc sum. This gets you a percentage within each job. Because [Sum of median..] is already on the sheet and properly set up with advanced settings, when I added this one to the sheet (this one uses [Sum of median...]) it adopted the existing settings. So I didn't have to do anything special for it. I added that to the tool tip. Now you see the sum, and you see the percent. (you can format this to suit your needs.)
Next I copied sheet 3 to sheet 4.
I dragged [Percent of total...] from the data shelf to the rows shelf and replaced MEDIAN(Paid..) with this pill. Now all the bars add up to 1. (Or 100 depending on how you format it.) Individual Visa Class stacks are sized by their percent size. I could have dragged MEDIAN() down to the data shelf instead of just replacing it with [Percent of total...], and that median value would have stayed in the tooltip.
In the end you don't need the interim [Sum of total...] calc. You can just embed it in the [Percent...] calc. But I just did this in steps and compartmentalized all the pieces to make it easier to show what I did here.
Example 2.twbx 21.2 MB
Thank you I think that makes good sense, playing with it now to work through each of the steps and make sure I properly understand it.
I'm trying to work out how modify it so that I get totals as in the 2nd photo (as opposed to on a 100% stacked chart).
Regardless, this is an excellent help!
Help me understand what the second screen shot is doing.
Is that the median paid wage across all visas, and the thickness of the bar determined by the number of records across all visas?
Oh. I missed all the stuff you typed below the second screen shot.
Looking at this.
Basically I just want to color a percentage of the bar by the visa class, but each time I add visa class it stacks up the bar.
So that 2nd screenshot would instead look like the first, only it would stop at 130K (instead of stacking each visa class group) for attorney.
Now it could simply be I am NOT choosing a good way to visualize this data and that's the REAL problem I'm having!
Right. I'm seeing that too.
When you say you want "percentage of the bar by the visa class", is that count of records per visa class? Or the [Percent of Total...] we created earlier...
We have a WINDOW_MEDIAN finction like a WINDOW_SUM, but the best I can come up with is $160K for attorneys, not $130K. I'm not sure why, and I'm pretty sure $130K is right because of what we get when we take out VISA entirely.
I'm out of time today, but I can look at this more tomorrow.
Josh -- So here are some things I am running into.
The reason why I'm getting 160K for median for attorneys is because on the sheet as it's currently laid out, the numbers a MEDIAN() function is going to use are the rolled up numbers by VISA, and 160K is the median for that set of numbers.
To get median at the row level (which will generate 130K) is to include CaseNumber (or maybe EmployerName) in the mix. Yes, then I get 130K, but we're getting a billion marks from that. And it becomes an expensive query in terms of time to display. (When you take out VISA and let Tableau auto-generate the median, it's doing it at the row level too, but then you have no way to color by VISA.)
I'm starting to lean toward your thought that you don't have this laid out in a way that lets you see what you want to see. You may need some reshaping on your data. I'm not sure what it'll take though.
I wonder if a better option for me would be to use a shaded area graph behind each line to show percentage of visa class or something... then I could allow it to be turned on and off with a parameter for if the user even wanted to be exposed to that extra information or not.
That wouldn't be nearly as complex a visualization for a user to process.
Regardless, thank you VERY MUCH for all the help.
I learned a lot about the product from your posts (new user, evaluating the tool).
Something I considered messing with was some dual-axis visualization where the height of the bar was determined by the true MEDIAN() value, and the background bars (via dual axis) would depict a color breakdown.
I'm not familiar enough with your data to make a good stab at that, and I'm really swamped here at work so I can't take the time to do that.
No need to apologize! You helped a lot, thanks again!