I am trying to reformat my pivot table. Currently, there are two columns called closed and completed, which essentially represent the same thing. I would like to merge these two columns together. How can I do this?
If you're working with an external datasource (SQL or Access data), this page walks you through how to do it.
http://answers.microsoft.com/en-us/office/forum/office_2010-excel/merge-two-field-sources-in-one-pivot-table-column/934518fe-5e91-47db-95d2-c5d1b4e31082
If you're using internal excel data ranges, you'll need to concatenate the columns first, then bring the concatenated column into your Pivot table.
ie. dataset is A1:G50, columns to combine are F & G. In cell H1, type =f1&g1 hit enter, and use the fill anchor (bottom right of cell) to fill down. Now create your Pivot Table with A1:H50, and just ignore columns F & G.
If the two fields columns represent the same thing, consider whether you can use just one of the fields in your report.
Let's say for your completed tasks field Closed says "Yes" and field Completed says either "Done" or "True".
If you concatenate the two fields' values you'll have PivotItems: "Yes-Done" and "Yes-True" etc..."
If it's necessary to report all those combinations separately, then my suggestion to use one field isn't a good fit.
If those combinations all have the same meaning, then you could keep it simple and just use one field.
Related
So basically, I have been trying to make excel scan one column and print out the row for cells which have specific letters.
For example I have the following data in my sheet.
What is required is to be have excel search for the values which contain T and I, and then print the new rows. Kind of like separate the two into two different tables, because then so that I can do further analysis on them.
So far I have been trying to use the VLOOKUP() function, but the problem with VLOOKUP() is that excel required a proper match and not just a letter in the cell. I had tried with both FALSE and TRUE. Then instead I tried to use the =INDEX($B$4:$K$9;MATCH($A$17;$A$5:$A$9;0);COLUMN(A4)) to make it work. But that also does not work, since it also requires a full match. Also another problem which I didn't realise before is that how can excel recognise each cell, because I will have different number after the letters everytime and then so how can one make excel not repeat the same row twice?
I have used another approach where I copy the data in a separated sheet and then I simply filter out the Ts and then copy/paste the Is into another sheet and vice versa. it is time consuming and so it would be much better if I can simply copy/paste my new data and it would generate the division on its own.
any suggestions or link would be really helpful.
UPDATE
I had a new idea on how to approach this problem. I was thinking that is it somehow possible to have VBA code running for filtering the data. Is there a way to specify in VBA code to filter the data by "Starts With" and Make the results be printed in another cell block?
Looks simple enough. First step is to make sure you have headers over your data and that it is in proper table format similar to my picture. Then select Data set and press CTRL+T. That should turn you data in to table object with stripes. Use the Formula =LEFT(C2,1) to take out the first letter which will be L or T.
Select the table and press ALT+D+P which will generate a pivot table based off original data set.
Drag the column with the formula I suggested over to the FILTERS area of the pivot table ID column to ROWS and all others to VALUES. Simply refresh and as new data is added you will get new pivot tables. Do not put the pivot tables on top of each other as I did that is only for the picture so you can see it. If you have too many filters to apply you can right click the helper column in the pivot table fields area to produce a slicer which is a button that helps you change the report quickly. Any other questions do ask.
I have a table that has some columns that are the result of a [power] query which has the key fields, some columns that are intended for manual data entry and some that are formula columns.
My problem is that when I refresh the query columns the manual input data associated with specific query rows don't remain on the same row.
To overcome this I use a query that first extracts the manual input data in the existing table together with the key fields, perform the new query and then do a table join at the end of the query to get the input data back in the correct record. (any input on alternative solutions welcome...)
For tables with no formula columns I could identify the manual input fields automatically using:
List.Difference(Table.ColumnNames(Current_Source_Table), Table.ColumnNames(Pre-Join_Query_Result)).
However, this would also pick up the calculated columns with excel formulas in. How to a distinguish these formula columns to exclude them? Preferably without having a naming convention that allows identification.
Many thanks,
Joe
Excel.CurrentWorkbook does not have information on where columns get their values from, so outside of naming conventions or other potential tricks I don't know, it is not possible to distinguish them.
I am trying to reorganize an Excel table with the columns "User ID," "Question" and "Response"
so that each column is one of the "Question" values, each row is one of the "User ID" values, and the values are the "Responses."
I have gotten really close by using a Pivot Table - the columns and rows are right, but I can't get the Pivot Table tool to display the responses. I have to select an aggregating function (e.g., "Sum" or "Product") which causes the responses to display as 0s or 1s
Is there a way for me to get the Pivot Table to just display the values instead of aggregating/summarizing them?
Also, if anyone knows of a different way that would allow me to organize the data set using "User IDs" as rows and "Questions" as columns that does not use Pivot Tables, that would be fine too.
Basically you need to create 2 lists of DISTINCT values, a vertical list of unique User IDs, and a horizontal list of unique Questions. There are various ways to do that with an array formula - look here for example.
Fortunately, since you don't mind using a pivot table, you can also "cheat" and just let the pivot fill the content with aggregated nonsense, then just grab the headers with a simple reference formula (=A1, =A2 and so on).
Ultimately you goal is to achieve:
First question... | Second question... | And another question... | ...
621546
621547
621548
...
Then you can use an IF statement in each "content" cell to grab the correct result:
{=OFFSET(Source!$C$1,MAX(IF(($A1=Source!$A$1:$A$100)*(B$2=Source!$B$1:$B$100),ROW($1:$100)))-1,0)}
That's an array formula, so make sure you Ctrl+Shift+Enter. What it does is conditionally (on matching both user and question) returns the row number of the match, aggregates the returned values (1 number and a lot of false values) into the single row number value, and then use that to access the response itself.
Is there a way to filter Excel tables similar to how Access queries can filter fields with OR operators?
E.g. I have the following table:
I want to list all items with the Messis aspect. In Access, one would make a query with Messis OR Messis OR Messis.. each in the following line or with OR in between. I would like to do something similar in Excel...
If I understand your question correctly, you want to find the row(s) where text X appears in any one of several columns. To do this, consider adding a column that is the concatenation of each column. Then use the column filter to select rows that contain text X.
An example:
For Column 6:
Results in:
Alternate answer
If, on the other hand, you want the OR statement for a single column, you can use the OR feature of the AutoFilter. If that doesn't appeal to you, you can use add a range outside of the table that includes has the text of a column in its first cell. Put the possible text options in the cells immediately below. Here's a picture:
Then, with the cursor in your table, click on Data, Advanced and complete the dialog box as shown.
Click on OK to see:
I need to create a table list in cognos, but the columns of this table would change depend on the data.I don't know how to do this. I just know in cognos report studio, we can drag data into cognos list report.
Update:
I don't know how many columns in this table.Because different data generate different number of columns.Actually,one row of data is a tree hierarchy.For example,the first columns is root,the second column is its child,and maybe the third columns is second child,or first grandson,and so on.So the columns always change.
In report studio just make list report by dragging on your wish.
But make sure it contains all columns that you need (i mean columns inculded in dynamic changes).
Say 4 columns you need at max.
Name
Roll no
Age
Address
Then create conditional style vairable (You can find in center bar)
now based on this condition dynamically chose the style.
Eg: If condition 1 satisfied
Name
Roll No
If condition 2 satisfied
Name
Address
I would use a Crosstab instead of a List. The columns are created dynamically without any other programming involved.
Just drag a Crosstab into report page, set the columns and rows (which can be nested by the way) and finally, drag the fact field right at the center of the Crosstab.
Try the following:
Create a list as per the requirement.
Hide the columns.
In each column expression, give the condition and set show as per the condition.