I have a spreadsheet that I'm trying to convert to a pivot table. My issue is the Data(Value) section is a range of numbers (0-10) and text (intermittent, frequent, often). How can I accommodate both into my table?
sample data set (highlighted column):
http://govega.com/1.png
expected pivot table result:
Pivot tables cannot show text in the values area. Values are always aggregated. Text can be counted, but not displayed as is.
It's a shame you didn't include column headers in the data. What you want to achieve might be possible with a regular table and formulas, but with such vague info about the data structure, it's hard to tell. It looks like you have months across the second screenshot, so there must me some date column in the source data.
Please simplify the data for an example. Leave out columns that are not relevant, but please include data that is needed to arrive at the desired result. A few rows will suffice. What makes up the rows in the second screenshot? Are these people? Is it conceivable that any one cell in the grid will have values from two or more source data rows?
Please edit your question with these details and then I'll tidy up this answer.
Post a comment when you're done.
Related
I need to find a way of determining the row number from the data source table of the selected cell in my pivot table.
The reasoning behind this is that I want to be able to edit/update the values from a UserForm.
My table with the data source is in sheet 1 named Data and my pivot table is in sheet 2, named Project management.
I know I can edit values in a Pivot Table by setting
EnableDataValueEditing = False
..but this does not give me the desired result since my original data remains unchanged and I also have hidden columns that I use for conditional formatting only and it would be a bad user experience to have to unhide the columns every time I need to edit them.
Does anyone have any idea or suggestion as to how I can retrieve the original data row number for a specific cell in my pivot table ?
As an example, the top is my original table and the bottom right is my pivot table. When the cell "Dummy Data" is pressed, I want it to give me the Row number of that data from my original table.
A "bad" workaround would be to use VBA to match the selected cell
value with the data from the table and when the match is found,
retrieve the address but this is not foolproof, the data should be
unique but with more data flowing in over time, this might not be the
case anymore. Therefore I am trying to avoid this method.
PS: if someone could edit my post and embed the image, I would highly
appreciate it.
A pivot table is a report summarizing information from the linked table or query. The only ways you're going to be able to update the information is if you know the row ID/number you want to change or filter the data source down to a point where you can identify it.
If you're going to be keeping and altering records, I'd suggest building a database (Access, for something quick and easy) to enforce some form of integrity and then link your pivot table and form to that database.
EDIT: VLookup or Index(Match(...)) is only going to return the first hit and that may not necessarily be what you want.
I will put my non-orthodox but perfectly functional way of doing it just in case someone is facing a similar issue or until a better way arises.
I have actually added a new column in my data table with the formula
=ROW([#Column1])
This gives me the row number for every entry.
Next I am just adding that column as a row in my pivot table, display in tabular mode to have it's own column and hide it. Therefore when selecting a cell, I am looking in the hidden column for the number and therefore I am getting the source data row number.
I'm processing a bunch of results from a google forms result spreadsheet into an excel spreadsheet (making nice graphs and charts) but I cannot figure out how to process the multiple choice question answers in the way google provides them.
In the image below you see some example results. The rows represent one person who filled in the form. The column name is the question itself and in the cells you'll see the multiple answers a person selected (checkboxes).
Now I would like to get an pivot table with the total percentage of times an answer is chosen.
I also made a small table with all the answer possibilities (see image below) but still can't figure out how to get the total number or percentage off occurrences of those answers in the other table.
Can someone tell me how to make this pivot table in a fast en efficient way, i have a lot more of these type of answers and questions to process so i can't go and type every possible answer in a table.
So this would be the desired result:
Thanks in advance!
Found the answer here:
Formula in Excel to count occurrences of substrings within strings
Basically, you need to search for a substring within a list of strings. This is the equation to use.
=COUNTIF(D2:D7;"*"&<answers>&"*")
I can't comment, but it sounds like you would benefit from using the Calculated Field feature of a pivot table. See this page Excel Pivot Table Calculated Field for more information. I would also suggest showing how exactly your data is stored. Is each answer in its own column? I hope so because that is much easier to deal with than the one column with the comma-separated Answer 1, Answer 2. Although, it's not too hard to create new formula-driven columns that separate the answers.
Back to the subject at hand, a formula in the Calculated Field would be something like:
Name: PercentageAnswer
Formula: =CountofQuestion/CountofPerson
Note that the Pivot Table should be formatted so that the rows are the "Question" header, with each row being an answer, and CountofPerson and CountofQuestion should be columns.
So I got this excel file with a lot of data which is why I want to avoid doing all this manually. Basically what I want to do is find all values that is the same in one column and then combine all it's values to one row.
If I have this data in a worksheet.
I would like the output to be like this
I appreciate all the help I can get.
EDIT:
This is what I get from a Pivot Table
When I actually would want it to look like this.
You must use Pivot Table function from (i recommend it) MS Excel.
It lets you to set wich columns becomes rows, what type of values they will contain and much more.
Pivot Tables are what you want.
It saved my career at my previous job :)
Here you got some screenshot of example for making sums for all duplicates in first column:
original table:
I have some raw data as shown below.
I created a Pivot Table for it, mainly just for formatting purposes (the ability to nicely group and expand the sub-items). The Pivot Table is shown below.
I need to display the LastUsageTime for each of the items (UsageName) listed in the Pivot Table. It is simply a lookup of the LastUsageTime column from the Raw Data.
From my research so far, it looks like I have to use Index+Match to do the lookup to match all 3 columns (TPC, TeamProjectName, UsageName). Something like:
{=INDEX('Raw Data'!A2:E2000,MATCH(1,('Raw Data'!A2:A2000=???????)*('Raw Data'!B2:B2000=??????)*('Raw Data'!C2:C2000=A6),0),5)}
However, I don't know what to use to retrieve the TPC and TeamProjectName of each UsageName in the Pivot Table.
I hope this makes sense, and thanks for any help!
For the sake of an answer:
Process your LastUsedTime data into what is recognised by Excel as Date/Time and then add a field to your PivotTable for Σ VALUES Max of LastUsageTime (or Max of ... whatever the column of adjusted LastUsageTime data is labelled).
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.