How do I return the nth to nth+10 largest value labels in a pivot table? - excel

There has got to be a way to do this, but I can't figure it out. It's easy to get a pivot table (and pivot chart) to display the top-10 based on subtotal values. But, I want the pivot table to display the 11th to 20th largest rows based on subtotal values. The problem is that the number of lines and columns in the pivot table are dynamic, based on ever-changing source data.
I've tried filtering the pivot table, but I can filter only for the top or bottom values, not for arbitrary LARGE() ranges in the middle. I've also tried to set up a field outside the pivot table that identifies the 11th-20th largest rows, but this field breaks if the number of rows or columns in the pivot table changes.
Are there any other ideas out there? Unfortunately, the PowerPivot or PowerQuery tools aren't available for me. Just vanilla Excel 2013.

Not a lot to go on but I'm guessing you have totals for rows and wish to filter these by rank. If so, maybe repeat this Sigma values entry and for this change Show Values As to Rank Largest to Smallest, then filter the column (not just the PT) containing the new row totals with Number Filters, Between..., is greater than or equal to 11, select And, is less than or equal to 20.

Related

How to make cells selection linked to a Pivot table dynamic?

I have a Pivot table and a formula with range of cells linked to this Pivot table. If I add a new row to the pivot source data, my Pivot table dynamically recognizes this and adjusts (i.e. adds a new row), however the linked selection does not (green selection, see image below; the last two rows were newly added to the Pivot source data).
Is there any way how to make sure that the selection updates with the Pivot? I would like to have the green selection dynamically adjust together with the pivot if possible. Thank you.
Thanks Fernando for a tip. In the end I have managed to do it a bit differently.
I have replaced the COUNTA function in the OFFSET with the count of unique values in Row Labels (in my case they are names of companies and each company has one value for each year range 2014-2016, 2017-2019).
I.e. now the OFFSET height is a result of formula which calculates the count of Row Labels meaning that every time I add a new company to my source pivot data the count of unique company names increases by one and consequently the AVERAGE range does too.
How to count unique values can be found here.

Select half of rows in each group in Excel pivot table

I have a table in Excel with about 30,000 rows. I grouped them based on a column value in a pivot table.
I am trying to run A/B tests on these rows, so I want to pull out half of the rows from each pivot table grouping.
Is there a straightforward way to do this?
Add a numerical field to your table thats goes from 1 to 30 000 for each row
Slide this field into your pivot as ROWS, You can now see your newly added column
On your pivot table, click on the arrow pointing down at the right of your newly added field.
Click on Label Filters.
Click on Greater Than...
For the sack of your example, to divide your table in half it should be 15000..
Half of your values should now be hidden and the upper half of your pivot table remains.
You can get the lower half using the Less Than.. option, etc..

How do I create a custom grand total or calculated field in my pivot table in Excel?

I have a pivot table with various calculated fields. I want one of these calculated fields to change depending on what I choose from the slicer. In order to help understand what I'm trying to do I can provide some screenshots:
Here each row contains information for one SITA and each column is a calculated field. The Var(%) column is (ABS(OTB Occupancy - OFF Occupancy))/OTB Occupancy. The very last entry in Var(%) is calculated manually and takes the average of the column (this restricts me from filtering the pivot table as I'll have to recalculate the formula and/or move it to another cell so it stays in the position where it is the last cell).
Now my problem is I am no longer using this pivot table but I am starting to create other pivot tables which need to be more dynamic than this one. For example:
As you can see the first two entries of April in the pivot table correspond with the previous pivot table (OTB Occupancy and OFF Occupancy are the same as Sum of Act_Occ and Sum of Fct_Occ respectively). However, I need the third column to be the average given in the last entry of Var(%). (Please note that this cell isn't part of the pivot table and it's just a formula i used). But also, if I were to select two SITAs only from the slicer I'll want only the average of them two.
I'm not sure if excel can do what I want but any help is appreciated.

Why pivot table does not show identical rows from the initial table?

Why pivot table does not show identical rows from the initial table? My expectation is that the pivot table could show these in separate rows.
The initial table has 100 rows and my pivot table (while taking 4 columns) showing less.
To be more specific: All cells in 3 columns out of 4 are formatted as text, 1 column as number. If there are two rows which are identical in all 4 columns why only one of these is shown in the end pivot table? The number column is not summarized.
Identical values in the rows of a pivot table will be rolled up into one row. If the number is in the values area of the pivot table, it will be summarized.
See this data example:
If the number column is in the Values of the pivot table, then the data gets summarised and only three rows of text are showing. It is entirely possible to rename the column title from "Sum of ..." to something else, so it may not be apparent that the data is summarised.
If you want to show all data, then put the number column into the rows area. You can then format the pivot table to repeat all item labels if you want to see the text for all rows.
Edit: If all values in the Rows area identical, then the data will be rolled up, too. A pivot table is about summarizing data. You'd typically have something in the values area that calculates something about this unique combination of four values.
If you want to show all duplicates, you need to enter a unique 5th column in the row area.

Excel pivot table exclude some column totals

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.

Resources