Filtering top 10 elements in pivot table does not show expected rows - excel

I am using the excel's pivot table to sort and filter data from Super Store Dataset from tableau . Here is a screen shot of my output.
The steps that I followed are:
a. Put Order Date in the Rows.
b. Put Sub-Category in the Columns.
c. Put the Profit in the Sum of Values.
After that I took these steps:
d. Sort the Grand Total of the Sub Category from largest to smallest.
e. Sort the Grand Total of Order Date from largest to smallest.
f. Filter Top 3 from the Sub-Category.
g. Filter Top 10 from the Order Date.
And the above image of an excel sheet shows my output.
Now the problem is , even though the excel sheet was supposed to show me the top 10 orders , it only manages to show 7 to 8 orders. The rest 2 to 3 of them are either blank or should not even belong to the top 10 category.
Does anybody knows why is this happening. And how can this be prevented.
Thanks.
Edit: This is how the top 15 looks like :
I believe top 10 is based on the vertical Grand Total and it should also be a subset of the top 15.
And this is the top 20 :

It looks like this is caused by opening the .xls workbook in Compatibility Mode. This means that Version 10 pivot tables are created, which have different filtering functionality to the later, Version 12 Pivot Tables.
Change the workbook to an upgraded file format (.xlsx), and refresh your pivot tables - you'll get an interesting message informing you of the changes made to Top 10 filtering, and then the multiple Top N filters will apply correctly:
Here's some more information about Pivot Table versions / compatibility, from Microsoft

Related

Take value from one pivot table and divide by value of another pivot table (or field?)

I have results from a survey. The first pivot table breaks down the responses by age group and language.
The third pivot table counts how many of the respondents have access to a computer, tablet, cell phone. For example, 13 Chinese respondents age 18-49 have access to a computer, which is 50% of the 26 total Chinese/18-49 respondents. And then 16 of Chinese/18-49 have access to a tablet, which is 62% of the total Chinese/18-49 respondents, and so on.
I manually calculated/used a formula (=IF($B5="", "", J5/$B5 for Chinese/18-49 w/ Computers) the percentages in the last table, but is there a way to do it via pivot table?
I've tried looking at the Analyze -> Fields, Items & Sets tool but can't figure this out.
I'd like to do it by pivot table so that it can refresh if there are any new survey results, like one with a new language.
Thank you!

PivotTable showing the Top 5 Sales Representatives per Month

I have an Excel data that shows the Sales of each of the Sales Reps. So I want to see the total for each rep per month which is easily doable with a PivotTable. Now I want the Pivot Table to only show the Top 5 per month so say I have 2 months in the coverage, I will see 10 names in total.
The Top filter in Pivot Tables computes for the Top for the entire data set and not for each category. Or am I missing something? Is it possible?
Thanks a lot for your responses.
You can make a measure if you connect your data to the datemodel and use PowerPivot
Rigth click on table to add Measure
That will enable you to use DAX i Excel (used in Power BI) And by using DAX you can make a top 5 per categori
inspiration: https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/

Sort cells that have the same date but different time

I currently have a large data set sorted largest to smallest in terms of demand-(solar+wind) and I would like to choose the top 12 cells in terms of demand-(solar+wind) but occuring 12 different days.
This is the top of my spreadsheet.
Thus as the peak demand-(solar+wind)often occurs on the same days at different times I have to manually scroll through the large excel file to choose the top 12 that occur on different days.
What is a shortcut way to do this? I have thought of conditional formatting or the sort function but none of these have proven useful to me just yet.
Simply insert a new pivot table, select "Trading interval" as a rows field and demand-(solar+wind) as values. In your new pivot table right-click on the Trading interval field and select "Group" and "Days".

Sort Olap cube by totals

I have an Olap pivot. I tried sorting by smallest to largest of 2014 Total. It works fine for the first measure values (Gross Written Premium GWP). But if I try to sort the next one (Gross Earned Premium GEP), the sorting for GWP revert to the default sort (so the numbers loses the sorting. GEP becomes sorted everything else becomes unsorted. If I sort Outward R_I Premium Expense then I lose the sort from GWP and GEP.
In summary, I can only sort one group at a time, and everything else becomes unsorted. Is there a way to sort all groups by 2014 Total?
So to further illustrate, this is how it looks like if I sort the second measure "Gross Earned Premium". As you can see, GWP is now unsorted itself automatically. It's like, you can't sort GWP, GEP etc all at the same time. Only one at a time.
This is what I'm trying to achieve. Ok. As you can see they are all sorted by 2014 Total. So please it is the same. It is not sort by a different column. It is sort by total. Total and total only. one and the same, thanks.
So just to satisfy Aron, Life is now all joined together by swapping the order of the column. But this is not really how I want to view the data.
Instead of sorting the 2014 Total column, sort the other text columns (the values you placed on rows in your pivot table) by 2014 total ascending.
Click on the drop-down in the row label cell for Values.
Choose More Sort Options...
Choose Ascending (A to Z) by and then select 2014 Total in the drop-down box.
Click OK.
Now do the same for the Reporting Class Minor field.
Click on the drop-down in the row label cell for Reporting Class Minor.
Choose More Sort Options...
Choose Ascending (A to Z) by and then select 2014 Total in the drop-down box.
Click OK.

apply two nested sub-totals to a table in Excel 2007

I would like to apply two nested sub-totals to a table in Excel 2007, but I find that the "SubTotal" button does not seem to work consistently.
Imagine the following table
Year Colour Amount
2011 Red 10
2011 Green 20
If I select all the rows and click on "SubTotal" with the following parameters
At each change in - Year
Use Function - Sum
Add subtotal to - Amount
Replace current subtotals - No
Page break between groups - No
Summary below data - No
I then do exactly the same but
- At each change in - Colour
I get the following nice table which is exactly what I want
Year Colour Amount
Grand Total 30
2011 Total 30
Red Total 10
2011 Red 10
Green Total 20
2011 Green 20
Imagine though that I change "Green" to "Red" in the original table
Year Colour Amount
2011 Red 10
2011 Red 20
If I follow the above steps, then I would expect to see the table looking in the same format. However I get the following
Year Colour Amount
Red Total 30
Grand Total 30
2011 Total 30
2011 Red 10
2011 Red 20
As you can see the Red Total is at the top whereas I would like it to be after the row "2011 Total" just as it is in the first table.
Is there any way of working around this. [I know I can do this manually, but would like to use the SubTotal button]
To summarize, I need both the 2011 and the Colour to be sub-totaled, but in a way that first the 2011 is sub-totaled, and then the Colour (as in the first table I show above). This needs to work whatever the data that makes up the table. For me, it only works with the first data set, but not the second data set.
QUESTION UPDATED
Here is an example. The example includes an extra ten "Price" columns not mentioned in the problem. The reason why I have shown these ten columns is to show why PivotTables are not my ideal solution. I did not think it is possible with PivotTables to show the "details" of the rows inline with the subtotals - in the manner depicted in the picture.
I agree with d--b - you are going to want to use pivot tables - they provide alot more intuitive features(in my opinion) than the subtotal system does:
The subtotal system is dependent on the initial sorting and organization of the data for what it produces. Whereas pivot tables do not care whether/how your initial data is sorted.
Good Luck.
EDIT:
You can still manipulate the subtotal table using standard copy/cut and paste features - it will maintain its tree structure:
So basically feel free to move the rows around using cut and paste however you want it to look - you can even move individual cells around within a row - it will still maintain it's structure/look. Good Luck.
Try to play with Replace current subtotals - YES
Had a bit to play around until i could reconstruct your problem, but this solved it.
It worked, when I had your example reconstructed, then marked the whole thing and did subtotal again, with replacement of current subtotals.
It worked also when I did your example on a clean pure data table.
And to reconstruct your example I had to use subtotal without replace on a subtotaled table grouped by color.
Hope this helps ;)

Resources