8 Replies Latest reply on Jul 21, 2016 3:11 PM by Derek Wong

# Help with percentages on stacked bar chart

Hello!

I'm having a hard time figuring out how the percentages showing on my bar chart are being calculated (see attached workbook,  tab "NEXUS vs CAR"). My goal is to recreate this graph:

But I'm having trouble with a) figuring out the right way for the percentage to be calculated (I think its basing its number on all possible modes, not just the two selected for this graphic), and how to have northbound and southbound bars next to each other.

Any help, as always, would be greatly appreciated!

Thanks,

Melissa

• ###### 1. Re: Help with percentages on stacked bar chart

You need to achieve 100% by Month?

See this one.

• ###### 2. Re: Help with percentages on stacked bar chart

Hi Luciano,

Thanks for your response. I'm not looking for 100%. I want to show the volumes in real numbers, but label the one "mode" (NEXUS) by what percent of the total car + NEXUS traffic there is. In other words, I'm looking for two solutions:

1. How to make the percentage labels shown here reflect the percent of red vs. the total of red + blue.

2. How to show both northbound and southbound bars on the same chart (next to each other, not two separate charts).

Melissa

• ###### 3. Re: Help with percentages on stacked bar chart

Hello again! It looks like you are making good progress on this dashboard

Here's my take on your request, I moved the "direction" pill to column, after month, which would take care of #2. For #1, I used a table calculation and computed by Mode (you can see the right click menu in the screenshot where I selected this. You can play around with those options to fine tune what exactly how the %'s are calculated.

1 of 1 people found this helpful
• ###### 4. Re: Help with percentages on stacked bar chart

Hi again Derek! Ha, lets see if I can generate a community question for EVERY tab I make on this dashboard!

So your tip for combining the directions is perfect and solved that problem... but I still have issues with the question #1.

I have it set the %NEXUS to "compute using mode" but I have a theory its using all four modes (bus, car, NEXUS, truck) to derive the percentage, since its a little lower than it should be. By checking against the tab "MONTHLY Chart" I can see the percentages listed as they should be, and it's under-counting.

So what I need to figure out is how to calculate that percentage based only on the modes filtered on the graph.

Thanks again for your help! It inspires me to one day come on here and help other folks. Though I think I have a loooong way to go before I'm doling out advice.

Melissa

• ###### 5. Re: Help with percentages on stacked bar chart

HI Melissa:

Jumping in here.....In the "Monthly Chart" only 1 port namely "Peach-Arch Douglas" is selected and the direction is "Southbound". If you select all the ports and the direction as "Northbound" it will be 38.7% as Derek has in his sheet.

Thanks

2 of 2 people found this helpful
• ###### 6. Re: Help with percentages on stacked bar chart

Good catch, P N. If you do want to replicate those numbers for just that port (Peace Arch), then you can simply add that same filter to the chart and I believe you should get the same numbers as the table.

1 of 1 people found this helpful
• ###### 7. Re: Help with percentages on stacked bar chart

OMG You are RIGHT P N. I forgot to filter the port. How you guys are so good at interpreting other people's data, I'll never know, since I can barely interpret my own. THANK YOU P.N. and Derek Wong! So grateful for the assistance.

And now, in addition to checking all my settings, I'll need to make sure I check all my filters too.... good lesson.

Now lets see how far I can go the rest of the week without whining with questions!

Thanks again,

Melissa

• ###### 8. Re: Help with percentages on stacked bar chart

It's only because we've all the exact same mistakes before, Melissa Fanucci! Soon you'll be teaching others, too