Need to hide the grand total(rows/columns) bar and show only labels for grand total. I need to sort the column as per the values(measures) and need to hide the bars for grand total row/column i.e. I do not want to show any bars for the grand totals, just the labels. Please find the below screenshot. Also find the URL for Tableau workbook: https://community.tableau.com/message/730696#730696
On the top toolbar: Analysis -> Totals -> Uncheck as needed.
I used a Max and Min function, although it worked for time being but not a long term solution as when the data will not be there then it will not give correct result.
Create a second measure to be the bar for the chart that has the following formula:
If size() = 1 then 0 else end
This will give at able calculation that, provided there are at least 2 bars to compare in the chart, will keep the grand total without a bar. Then, put the actual measure in the text label area to get the number to show up.
Related
Sorry about the title, it was hard to figure out how to word this. So, my main problem is a Total Count column represent the overall quantity, but the other columns are PART of a Total Count column. This wouldn't be so bad except the other columns may be part of each other too. Meaning, for like 11/26/18... the Total Count column is ALL of the Item Count, but some of the other ones may be in New PR Count too, but not necessarily all. Same thing with Dropped Outside LT and Dropped Late columns. They are all part of the Total Count column but all are not necessarily separate.
I feel nothing short of a bunch of complex formulae or macros will fix this so, what is my best option to show at least the individual counts? I was thinking to have the Total Count column as a Clustered Column chart type, the other columns as a Stacked Column and the 2 lines as is. Or all columns just be Clustered Columns and lines as is. What do you all think would best show this data?
So sadly, due to proprietary, I am told at work not to upload an image of the chart. FUN. So, here is what I have..
7 Series - 5 Series are Stacked Columns in Primary Axis, 2 Series are Line with Markers in Secondary Axis. Each column is for a single week's entry of data (so based around a Date entry.
The two Line with Markers are percentages (Secondary Vertical (Value) Axis) on right side of chart. On left side is Total Count (Verical (Value) Axis) basically showing a Count being connected to the Total Count column.
I have a line chart that displays the revenue of multiple airlines, throughout the period of 2011 to 2016 - with data points plotted quarterly (Q1-Q4, for each year) on the X-axis
I would like to only show the data labels (on the chart) for Q4 of each year, for each airline. I would like to do this and keep the axis as is.
Any suggestions will be much appreciated,
Thank you!
(I have Excel 2016)
Your question didn't express clearly if you want to add the labels by means of a VBA macro.
I suggest to do following:
Dim sData as Series
For i = 1 to sData.Points.Count Step 4
sData.Points(i).ApplyDataLabels
Next i
Note that if there is not value for the Point i in the series, the label seems not to be displayed. It took a while to find out why a label was not added to the chart. To detect this case, I wrote following test:
If sData.Points(i).HasDataLabel Then
If Len(sData.Points(i).DataLabel.Text) = 0 Then
...
End If
End IF
Searching a little in the web (around 3 minutes, that maybe you should spend the same time) found this article:
http://www.cs.mun.ca/~n39smm/Excel/Data%20Label.pdf
This is the resume, but I suggest to view the document because have a lot of graphics.
Click on the bar you want to labeled twice before Add Data Labels.
Click on the label, then right click and select Format Data Labels.
Check the Category Name and uncheck Value.
A little research before asking can save you a lot of time.
I'm trying to turn a cross table that looks like this
into a table which shows the subtotals and percentage over each Group like the example below
Where the percentage is the sales of each product divided by the total sales in each group, so for Product A = 20 / (20+40+30) = 22%
So far, I've managed to use Spotfire built-in subtotal function and the following expression to almost achieved the table I want
Sum([Sales) / Sum([Sales]) OVER (Intersect(Parent([Axis.Rows]),All([Axis.Rows])))
but the only problem is that the percentage for my subtotal row doesn't seems to equal to 100%, instead it is taking the subtotal sales divided by the grand total for all groups, meaning 90 / (90+140) = 39%
Can anyone advise me where did I go wrong and how do I resolve this? Thanks
You didn't go wrong anywhere but your subtotals aren't going to work out how you want. The Subtotals are calculated by Spotfire automatically on the underlying grouped data. So in this case, the subtotal is going to be for the first node of your hierarchy (group). i.e. Groups 1 and 2. You aren't going to be able to change it with your current layout. As you know, subtotal is a portion of the grand total. Grand total is for the entire Cross Table, which will be 100% no matter what your data is. Thus, it's impossible for the sums of 2 or more subtotals to be > 100%. Your subtotal is the SUM of the values calculated off of this formula:
Sum([Sales]) THEN [Value] / Sum([Value]) OVER (All([Axis.Rows])) as [% of Total]
I am developing a Pareto Chart for my client in Excel 2010. They currently have a chart that shows the percentage of each category on the primary Y-axis. Then, the secondary Y-axis is used for the cumulative percentage, up to 100%. So far, this is a normal and easy to create Pareto. I should also mention it is based on a Pivot Chart with 3 different Report Filters.
They wish to show data labels above each column to indicate the number of occurrences. So for example, they may have 6 events on the x-axis:
1 - Event A, 50%, 1,000 occurrences
2 - Event B, 30%, 600
3 - Event C, 10%, 200
4 - Event D, 5%, 100
5 - Event E, 3%, 60
6 - Event F, 2%, 40
I cannot figure out how to show the data labels so they show the value of each category (e.g. Event B would show 30% on the left axis,have a data label of 600 and the Cumulative total line would be at 80% at this point). Please keep in mind that depending on what is selected with the Report Filters on the Pivot Chart, the name/number of categories on the x-axis will change, so I don't think adding a formula into the data label is the answer either.
I've looked everywhere (I think) for an answer, but cannot figure it out. I'd prefer to avoid a VBA solution, but I do know how to write VBA code, so if that's the only way, a nudge in the right direction would be greatly appreciated.
Thank you.
I have a graph that is pulling data from a PivotTable, so I get a distribution of counts (how many in category A, how many in B, how many in C, etc)
But above each bar I also want to show a percentage of the whole. So for example I might be able to say "This bar for Category A shows we clearly have 2000 of it, but see the number on top of the bar, it's only 15% of the total"
Does this make sense?
Either
Use a line series to show the %
Update the data labels above the bars to link back directly to other cells
Method 2 by step
add data-lables
right-click the data lable
goto the edit bar and type in a refence to a cell (C4 in this example)
this changes the data lable from the defulat value (2000) to a linked cell with the 15%
In Excel for Mac 2016 at least,if you place the labels in any spot on the graph and are looking to move them anywhere else (in this case above the bars), select:
Chart Design->Add Chart Element->Data Labels -> More Data Label Options
then you can grab each individual label and pull it where you would like it.
You can do this with a pivot table and add a line with the pourcentage for each category like brettdj showed in his answer. But if you want to keep your data as it is, there is a solution by using some javascript.
Javascript is a powerful language offering a lot of useful data visualization libraries like plotly.js.
Here is a working code I have written for you:
https://www.funfun.io/1/#/edit/5a58c6368dfd67466879ed27
In this example, I use a Json file to get the data from the embedded spreadsheet, so I can use it in my javascript code and create a bar chart.
I calculate the percentage by adding the values of all the category present in the table and using this formula (you can see it in the script.js file):
Percentage (%) = 100 x partial value / total value
It automatically calculates the total and pourcentage even if you add more categories.
I used plotly.js to create my chart, it has a good documentation and lots of examples for beginners, this code gets all the option you want to use:
var trace1 = {
x: xValue,
y: data,
type: 'bar',
text: yValue,
textposition: 'auto',
hoverinfo: 'none',
marker: {
color: 'yellow',
opacity: 0.6,
line: {
color: 'yellow',
width: 1.5
}
}
};
It is rather self explanatory, the text is where you put the percentage.
Once you've made your chart you can load it in excel by passing the URL in the Funfun add-in. Here is how it looks like with my example:
I know it is an old post but I hope it helps people with the same problem !
Disclosure : I’m a developer of funfun
The easy answer is you can edit the pivot table:
-Right-click on the column showing series and goto pivot table options.
-Click on Show values as an option.
-Click on the percentage of grand total.
-Enjoy :)
Note: Although it will change the original values also to percentage. To show both values as well percentage follow some other solutions that are available in the thread. Just answering because this answer was somewhat relevant and not yet mentioned.