below i've shown the data I have and need what is present in the column Need. Its a pivot table but i'm not able to use it according to how i want. I need to sum it group wise. Groups are based on different colors and i want to divide each year by the group sum year number.
I've tried creating a calculated Field in pivot but that is also not showing it on parent level.
Thanks.
best regards,
Related
I am trying to get sum of a sales column for different combination of filter columns say, area, region, prods etc. pivot table is good to this but i need only the sum. sometimes i use it in mobile where pivot is not giving me the filter option. please help me to achieve the same through formulae
I have a data set of 40,000 rows and I am looking to find count of distinct values for a specific column within the data set. I know Excel for Mac doesn't support data model. Has anyone found an alternate way to do this via formulas? Thank you for your help.
You can use the helper column to calculate the part of total items count in a group that can be summed in the pivot table.
For example, to get count of distinct names in group I divide 1 by total count of names in group
=1/SUMPRODUCT((A2=$A$2:$A$16)*(B2=$B$2:$B$16))
and in pivot table I can sum all parts.
I have some irregular data (e.g. I have 5 groups of data, each group occupies different amount of rows) and I am wondering if there is a way to use Python to add subtotal to all of my spreadsheets, breaking at each group change.
Since row amount is irregular for each group, I tried inserting empty row at each change and adding a subtotal. However, I am unable to do a sum for each change or a grand total without using hard code (specify on the row number, which changes for every spreadsheet).
Thanks in advance.
Edit: Added code I am working on
for num in range (8, ws.max_row+1):
if ws['E'+str(num)].value == ws['L1'].value:
ws['L'+str(num)]='=SUMIF($A$'+str(ws[num])+':$A$'+str(ws[ws.max_row])+',LEFT(A'+str(ws[num])+',6),$E$'+str(ws[num])+':$E$'+str(ws[ws.max_row])+')'
num+=1
Can you add a column to each list that can help you categorize them? that way you can do a =SUMIF based on the categorized names. here's a code snipit and an image to reference:
=SUMIF(B:B,B15,C:C)
the formula calculates the left table (dogs).
as you can see the totals wont be added if the category is mentioned. also, all three tables are irregular so it will add up regardless of length.
I need your help on the below two points:
1) When I subtotal the value based on the allocation key, the fields where i have used avg() to sum up the percentage is not summing up correctly.
2) How can i provide the different color coding for the sub total row and the header in the report.
Please refer the snippet for your easy reference.
Thanks in advance
enter image description here
Coding:-
Avg(If([Qtr]="Q1",[percentage])) as [Q1 %],
Sum(If([Qtr]="Q1",[Total Value $])) as [Q1],
Avg(If([Qtr]="Q2",[percentage])) as [Q2 %],
Sum(If([Qtr]="Q2",[Total Value $])) as [Q2],
There has been an update since 7.11 to allow the user to toggle between calculating values on the underlying data or whats shown in the cell values of the pivot table.
It is now possible to configure the cross table to calculate subtotals
and grand totals based on the aggregated values visualized in the
table, as an option to calculating it using the underlying row level
data. This is useful, for example, when you want to visualize the sum
of the absolute values of the categories displayed in the table:
As far as I know, you cannot do color customization to the Sub or Grand Total rows. You can edit the appearance of the Header row by View > Visual Theme > Edit Custom Theme and modifying the Details Tab. You can also pull in a template from one of the Spotfire Sample Reports that already do it if you want.
https://community.tibco.com/wiki/whats-new-tibco-spotfire?
The 6.5.3 User's Guide says this regarding the first question:
Note: The aggregated value for subtotals is not calculated on the
values shown in the cross table, but on the underlying row values. For
example, if "Average" is used as aggregation measure, the subtotal
average of a column is calculated on the rows the column is based on
and not on the values shown in the cross table.
I believe that "subtotal average" means the average of the rows involved in the calculation. I don't see any way to customize the way that subtotals are calculated.
For your second question, I don't believe that there's a way to do that, unfortunately.
I am using an Excel 2010 pivot table to display data. I need the sub totals in most columns but some columns display percentages and totaling the percentages is not correct and displays confusing values. Is there any way I can choose which columns not to total.
It's hard to make sure I'm accurately addressing your question without more detail about your data, but I will provide a simple example.
Recommendation
I would suggest that you put all measures/values in the Values area of the Pivot Table, and not in the Row Labels. That way, you will not get Row sub-totals for values.
In order to address the non-additive totals and sub-totals for your percentages, I recommend that you remove the pre-calculated percentages from your Pivot Table Values and instead use a Calculated Field that is calculated within the Pivot Table itself from the base data, and will provide correct aggregate totals and sub-totals.
Example
See below:
Method
In order to create a Calculated Field using the Ribbon, select your Pivot Table, and then go to PivotTable Tools --> Options --> Fields, Items, & Sets --> Calculated Field.
Then, enter a name for the new Field (CalcPercentSoldUnits in my example below), as well as the formula definition for the field ( =UnitsSold /UnitsProduced in my example below). Click 'Add' to create the field and then 'OK' to exit the dialog box.
Now you have created a derived field not in your base data table, but in your Pivot Table, which can be used just like a normal field. You can also see that it will calculate totals and sub-totals correctly because instead of adding constants, it is calculating based on the sums of other constants from which the percentages are derived.
In some cases depending on how your data is structured, you may need to create a Calculated Item instead of a Calculated Field.
I hope this helps - if this doesn't address your situation, please post additional examples of your data and desired results. Thanks!
I have the same problem. Some Columns should be totaled, and others should not be. The only thing I figured out is to Grand Total all columns, then format those cells in the Grand total so that the font color matches the background color. This hides those selected Grand Totals from being viewed and/or printed. I experimented by expanding the Pivot Table rows, and the formatting for the selected cells followed into the new cell(s) and when I removed some of the rows, the formatting followed as well.
Wherever you don't want to show the total columns simply hide the column in the total section. I couldn't find any other way to do it.
Be careful about things like distinct/unique counts. This method helps with percentages, but you don't want to sum or average or otherwise aggregate unique counts. I would prefer to be able to just exclude a total for a single field but haven't found a method to do so.
I think I have a similar situation and a great answer for presentation purposes. I'm billing a customer for unbilled items; my pivot shows Qty, rate, and total missed revenue (qty*rate) for each month. Having a sum of Qty and Revenue makes sense for each month, but totaling the rates of the items doesn't. Pivot table and value options are an all-or-none solution. Rather, I just selected the totals I needed to hide and formatted them with white font color (blue for the grand total). My pivot table looks great now with this band-aid approach.