I am not an excel expert, but I have been searching for days on a method to repeatably pull non-zero entries from a 2 column table. The reason it has to be repeatable (and hence can't use filtering) is that I have about 50 pie charts with different data sets I need to create so that the charts only have slices that are greater than zero.
Here is an example of the source data, which I have pulled from a few thousand rows of raw entries
| Possession type observed | Count |
| ------------------------------|--------
|Handheld device 27
|Backback 53
|Baby stroller 5
|Walking aid 1
|Headphones 5
|Wheelchair or mobility device 2
|umbrella 1
|Bundle buggy 0
|book 0
|DVD 1
|purse & holding keys 0
|handbag 1
|clutch wallet 0
|white paper 0
|grocery bag 0
|purse 0
|holding newspaper 0
|None of these 83
I haven't found a satisfactory solution to build a pie chart out of the data above that removes zeros, so I went ahead and tried to create a summary chart only listing values > zero.
But my problem is that I can pull non-zero entries out, when it comes to the entries with the same value (e.g baby stroller and headphones both have a value of 5), I can't grab baby stroller, then headphones.
Ideally I would like the summary chart to look like this:
| Possession type observed | Count |
| ------------------------------|--------
|Handheld device 27
|Backback 53
|Baby stroller 5
|Walking aid 1
|Headphones 5
|Wheelchair or mobility device 2
|umbrella 1
|DVD 1
|handbag 1
|None of these 83
Thanks so much in advance for any assistance!
To get the desired output follow these steps:
Step1: Select the data
Step2: Choose pivot chart from insert tab,follow the wizard to create the pivot table and chart where you want them or hit Alt + D + P and 3 times enter
Step3: Change the chart type to pie from the Design tab
Step4: Drag the 'Possession type observed' field to the 'Axis' area
Step5: Drag the 'Count' field to the 'value' area as well as 'report filter' area
Step6: Filter out 0 using the dropdown on the chart
Related
All,
I have this data I pulled from a database that I need to readjust. Here it is:
ID | Type | total
1 Purchase 12
1 Return 2
1 Exchange 5
3 Purchase 34
3 Return 4
3 Exchange 2
The desired result is:
ID | Purchase | Return | Exchange
1 12 2 5
3 34 4 2
and so on with a lot more data. Can this be done?
In Excel, format the data like so:
Choose a cell in these data, go to Insert -> PivotTable, insert it where you would like, and use the following settings:
This gives
Under "Design" in the Ribbon (make sure that your PivotTable is selected), go to Grand Totals -> Off for Rows and Columns. This gives
Click the "Exchange" cell and go toward the top of it, right below the "Column Labels" cell - you will see that the arrowhead will change and you can drag the column:
My Excel sheet contains columns for id, date, amount and name.
If two or more rows have the same id and name I want to merge them into one row with the amount of those two combined. Can anybody help me doing this?
Use concatenation with Columns ID and NAME (=ID&NAME) in another column and look for the pivot table. Move to Insert->Pivot table option to get the attached answer]
Hope this clarifies
Here is a possible solution (as far as I understand the problem) using a PivotTable:
As you can see, there is not really much to it. Just insert a pivot table and drag the ID & Name to the Rows while you move the dates and the values to the Values section of the pivot table. The Values in the Column section will be automatically generated.
The only thing I changed at the end was to format the pivot table nicely doing the following:
Remove SubTotals by name
Using a PivotTable style that I like from the PivotTable menu in the section Design.
Show items in a tabular format. That means that the name and the ID are shown on one row and not in a cascading format (ID in one row and the name in a second row underneath + indented). You can achieve this by right-clicking on the name and selecting Field Settings. A new window opens (showing the settings). Go here to the Layout & Print tab and select Show item labels in a tabular form. You might have to repeat that for the field Name and the field ID (depending on which of the two fields you chose to show first in the Rows section of the PivotTable).
Let me know if this solved your problem or if you have any questions.
Note: since no sample data has been provided I made some up. I sure hope this data is somewhat similar to what you are trying to aggregate.
Used sample data:
ID Date Amount Name
1 05.03.2015 121 Peter
2 14.01.2015 127 Max
3 11.01.2015 77 Eva
4 06.11.2015 141 Jamie
5 04.03.2015 58 Sophie
1 04.04.2015 94 Peter
7 20.06.2015 52 Lucas
3 14.12.2015 136 Eva
2 02.11.2015 93 Max
10 20.08.2015 59 Mason
4 11.01.2015 145 Jamie
4 02.02.2015 113 Jamie
4 26.02.2016 89 Jamie
1 30.03.2016 137 Peter
15 09.09.2015 81 Jackson
16 25.02.2015 61 Liam
2 26.02.2016 133 Max
2 26.10.2015 80 Max
19 25.09.2015 76 Aiden
I've been hitting a wall on this today. I'm pulling my data from a SQL DB and in my query I'm setting flags so that I can use the Pivot table to count up all the different checks I'm trying to run on the data. A simple version of what I'm doing would look like this is below with a Greater than 90 days and Error Check flags set depended on the data in Uptime.
Host Team Uptime >90 ErrChk
Srv1 A 15 0 0
Svr2 A 102 1 0
Srv3 B 95 1 0
Svr4 B 20 0 0
Srv5 B 21 0 0
Srv6 B ERROR 0 1
Srv7 A ERROR 0 1
Srv8 B 150 1 0
Srv9 A 100 1 0
Srv10 A 10 0 0
Srv11 A 125 1 0
Srv12 A 40 0 0
Srv13 B 111 1 0
Srv14 B 100 1 0
Srv15 A 15 0 0
If you were to plug this into Excel exactly the way that it is you will see what I'm getting at. Once you create a Pivot table on this data and use the Team as the Rows and the Sum of >90 and ErrChk the pivot comes out and looks correct.
Row Labels Sum of >90 Sum of ErrChk
A 3 1
B 4 1
Grand Total 7 2
But the next piece is where it gets wonky. With a Pivot table when you double click one of the values it filteres down on what makes that value, however when you do it on the value of a SUM, it just filteres down on the Row Label. So for this example you would click 3 under >90 for team A to see what the 3 servers are that have been up for longer thank 90 days. However when you do this it gives drills down to just a filter of team A showing you all of the servers, the good, the bad, the error.
My question is how can I drill down to just the items that make up that value? I've tried all I can think of, have the filed be NULL, 0, calculated fields.
I would suggest adding an additional pivot table for the view you want. For your example you might want to add Team, then Host to Row Labels. Then add Sum of > 90 to Values. Then add > 90 to Report Filter and set the filter to 1.
These pivot tables could all be on the one worksheet pulling from the same data source as a kind of summary and the filter would be preset so there would be no need to provide instructions to those viewing the summary.
If you'd like let users change the filter easily you could add a slicer which will present all options by which the data can be filtered by.
I have two data columns:
Record | Record Version
------------------------
1 | 1
1 | 2
1 | 3
2 | 1
2 | 2
2 | 3
2 | 4
3 | 1
3 | 2
3 | 3
4 | 1
4 | 2
4 | 3
4 | 4
4 | 5
4 | 6
5 | 1
6 | 1
Is it possible to create a calculated column within a MVS-2012 model or PowerPivot that will give the MAX of the Record Version for a corresponding Record? For example the MAX value of Record 1 is 3, MAX value of Record 2 is 4 etc.
Yes. Add that table to your Power Pivot model, either by pasting the data into Excel and then clicking Add to Data Model on the Power Pivot ribbon, or by opening the Power Pivot Window and adding it form it's original source there.
In the Power Pivot window, go to the table where this data is located.
Select the Record Version column, then click the drop-down next to AutoSum in the Calculations group on the Home tab and choose Max.
A calculated column will appear at the bottom. YOu can rename it to something like Max Record Version.
Make a PivotTable in Excel (click the PivotTable button on the Home tab).
Add the Record field to rows and the Max Record Version to values.
If you actually want a calculation that will give you the max for the group of record you could do something like:
=SUMX(VALUES(Table1[Record])
,CALCULATE(MAX(Table1[Record Version]))
)
Generally, as #mmarie suggests, you are better dealing with this kind of problem with a measure rather than a calculated column. That said, sometimes you just need that extra column (usually to use as a dimension).
Assuming you have a table called recordsFact, this gives the MAX of that record:
= CALCULATE(MAX(recordsFact[Record Version]),
FILTER(recordsFact, recordsFact[Record] = EARLIER(recordsFact[Record])
))
I have an excel sheet that needs exporting into MYSQL. This sheet contains a grid with the rows being components and columns being products.
Column A holds the component name with columns b onwards using row 1 as product names.
The grid is a grid of components that make up that product in row 1 of the column. not all components are used in a product, for example:
xxxxxxxxxxx | product 1 | product 2
component 1 | 1 | 0
component 2 | 0 | 1
component 3 | 0 | 10
and so on. I am trying to get a formula that can check each column against each row, if the column has a value > 0 or not blank then grab the product name, component name and the value ready to be used to generate SQL (i already have component ids etc)
is this possible? I have seen reverse lookups and lookups using grids but not to this level..
would be very grateful to any excel wizards out there that can save me hours of manually doing this (there are 102 products with ~ 1000 different components..)
Perhaps what you want is described here followed by filter to delete rows with Value 0.