Labeling % of total on stacked bar chart in Tableau - excel

I am trying to create a stacked bar chart with dollars on the vertical axis, date on the horizontal, and three separate qualitative measures (dollar value is divided between all three of the measures). I'm looking for a way to label each section of the bar with the percent of the total (labels fall inside each section of the bar).
The data that I have is the date, category, Total $'s, category 1 $'s, category 2 $'s, category 3 $'s.
Up to this point, I have taken the date pill and dropped it in column, taken measure values and dropped it in rows, taken measure name and dropped it in color in the marks box. I'm left with a stacked bar to my liking. So I am pretty much looking for a way to label each portion of each bar with say the sum of cat. 1 divided by the sum of the total bar.
Can anyone help?

It's pretty simple. Drag Total $ again to the rows, then right-click, quick table calculation, percent of total. Then right click again, Compute using, Cell.
This will give you the percentages. Now just drag this created field to Label

Related

Age of Passengers Histogram

I have a data set that has ages listed and the number of passengers who are that age. I need to create a histogram to show that data. I only seem to get a histogram chart output of 1 column of the data, not both though. See image below.
How do I get essentially a column chart (but as a histogram) to show the quantity of passengers in each age group?
enter image description here
I think you want to use a clustered column chart, with the age column as the horizontal axis.
you can reduce the gap width for the look of a histogram.

Excel Pivot Chart 'fixed' horizontal axis

I have got a horizontal axis that holds numbers (roughly 7,5 through 18 at 0,5 intervals) based on the set filters.
I would like it to always show the 7,5 though 18 on the horizontal axis, even if the filtered only is applicable 10 to 12,5 for example.
Thing is, the axis options do not show bounds to set as I have found to appear in other solutions:
I've double checked to make sure my axis data is formated as numbers:
In case of possible relevancy, the formula used to calculate the day time indicator is
=mround((mod(GDQ[Timestamp];1)*24);0,5)
Is there a way to have the horizontal axis always show start through end plotting the filtered data always on the same timeframe?
I had exactly the same issue, and solved it on the pivot table side.
Go to the field setting (in your case for the day/time indicator, your x-axis), then to the tab "Layout & Print", and activate "Show items with no data".
Now every category will always show up in the pivot table, even with no data after you do some filtering with your slicer, and the layout of the graph will remain constant (axis limits).

Create a pie chart of ages, showing under 30's, 30-50's, and over 50's

I have an excel 2010 sheet with a bunch of customer data. I have the ages for the customers. They are a float value. I want a pie chart that shows the number of customers under 30, between 30 and 50, and over 50.
There are over 2000 rows.
I highlight the column, click inset, click the pie chart icon, and I get a disco ball coloured chart with the numbers 1-9 in the legend, excel then proceeds to crash. I get that, there are too many ages to put in a pie chart at that point.
So I've tried adding a column with a nested if statement to give me the values "Under 30", "Over 30 and under 50", and "Over 50". I thought, given there are only 3 unique values in this column, I could create a pie chart on it. Hoping it would give me the percentage of each age range. But I only get a legend value of 1 and a blank pie.
I know I'm obviously missing something really simple but I can't get my head around it. Any help is greatly appreciated.
Two things:
A pie chart does not aggregate data automatically. You need to do the aggregation and feed the aggregated data to the pie chart
A pie chart needs numbers, not text. Well, any chart does.
So, to aggregate, you can use Countif or Countifs. For example, in the screenshot below the three numbers are calculated this way:
under 30 =COUNTIFS(A:A,"<30")
30 to 50 =COUNTIFS(A:A,">=30",A:A,"<50")
over 50 =COUNTIFS(A:A,">=50")
Then select the data as in the screenshot and insert a pie chart.
Add data labels and change the data label to show percentages if you want.

How to set the max value at 5 in a radar graph in Excel whereas all the values are smaller than 4

I have an excel radar graph.
I have many criteria. Every criteria has to have a value between 0 and 5. But if all the values are strictly smaller than 4, then the graph considers 4 as the max value, but I still want 5 to be the max value.
How to do that ?
Thanks,
You didn't say what version of excel you are using but you can change axis min and max in a radar chart just like any other chart.
select the chart
on format tab select Radar Axis from the drop down (under current selection tab)
Click format selection and then change your min and max.
You can click on the chart and go to the ‘+’ beside the chart which shows the chart elements. The first element is ‘Axes’.
If you hover the arrow more right on the ‘Axes’ row, you will see a small black arrow that you click -> then click ‘More Options’ and you can change the Minimum and Maximum bounds of it .
Coincidently enough had the same issue with the same max value.
First right click for "Select Data..." On the left side for Legend Entries. Click on "Add" and you will come to an "Edit Series" popup. Give it a "Series name" and for the "Series values" input "={5}" instead of the default "={1}". And that's it. You should have two Legend Entries; one for your main data source i.e. Series1 and the new one just created.

Hide a range of data labels in 'pie of pie' in Excel

I have several graphs linked to a data template - The data in the template changes depending on the selected business unit.
I have approximately 50 categories in the data template linked to a pie chart and depending on the unit selected I could therefore have anything from 0-50 categories shown as a percentage in my pie chart.
What I want to do is only show categories with a value over 2% in my pie.
So, I have used the 'pie of pie' function to make the cut at 2% but I do not want to see the second pie at all.
How do I hide all the values and data labels in the pie of pie chart? Ie Can I use formatting in the pie of pie chart to hide values between 0-2%?
I have searched for a solution to this but only come accross answers on how to hide zero values:
Example: Format Data Labels, Number, Format Code: 0%;;; OR 0%;[White][=0]General;General
I need a solution to this that does not involve changing my original data (ie I do not want to group my categories under 2% into an 'other' category in my data template as the categories will change depending on the unit selected)
Any advice?
I know this is a late answer but was looking for this myself and just figured it out.. First format the second pie so that each slice has no fill (becomes invisible), to speed this up just set the first slice to no fill and then highlight each slice and select F4 to repeat last action. Next select any slice from the main chart and hit CTRL+1 to bring up the Series Option window, here set the gap width to 0% (this will centre the main pie as much as possible) and set the second plot size to 5% (which is the minimum it will allow), and you have made your second pie invisible!

Resources