I am importing a report that has a strict template from a sales monitoring site and I need to create a pivot table to reflect the data. The report generates data on daily sales for the month. The issue: I want a pivot table to reflect the imported data, but display 0's for the dates that are in the future.
For example, my data is being imported and has data from 3/1/16 to 3/21/16 (today's date). I want a pivot table generated from this data to display the full month of March, with 0's for the dates after today. Is this possible?
As far as I know, pivot tables need a data source to read from. So if you want the rest of month to show up with 0's, you will need to create dummy data for it. So fill out the data source with the rest of the month and 0's in all the columns. Then it will show up in your pivot table (as long as those cells are part of the pivot table's data source).
Without seeing the full layout you have in mind, it's difficult to be precise with an answer. Based upon what I can gather from your original post, I'd recommend inserting a column into your source data, let's call that column B.
Let's say your source data dates are in column A. Let's assume you have a header row in row 1 and column A is formatted as Date.
Insert a formula into B such that:
=IF($A2>NOW(), 0, $A2)
This will give you a column that either returns zero for future dates or the source data date for dates in the past/present.
Update your pivot to reflect the new column B instead of Column A. The challenge you will have is that Excel will attempt to present 0 as a date (since the rest of the column is a date), showing 01/00/1900 instead of zero.
Related
I'm looking to create a overview of the planned maintenances for this year.
I have a maintenance worksheet where we put in the planned events, with a column where the dates are in the format of 'day, dd-mm-yyyy'. Since the format of the cells is 'date' in this exact format, I can use the filter to create an order based on the 'dd-mm-yyyy'. PRNTSC of source data
It becomes an issue when I want to create a pivot table. While using a pivot table gives good insights what type of different maintenance is done on a certain day PRNTSCR of pivot, the column can only be ordered in alphabetically. , although format of the column should is 'day, dd-mm-yyyy'
How do I format the column in the pivot table to be able to order chronologically?
Thanks!
The point of this exercise is to try to make this analysis quicker/easier to update. I had it pretty dialed in using a data tab and a pivot table, copying and pasting values/formulas as needed to update. I am trying to improve on that by using Excel's new Dynamic Arrays.
My table is setup with four employee detail columns (Location Name, Location Number, Employee Name, Employee Number), and several (many) columns for dates worked. My issue is the dates worked.
I am using UNIQUE and FILTER to get a list of flagged employees - works as I intended/hoped; lookup formulas to find the location name and number data for each employee from the data table - works as I intended/hoped; and I have been copying/pasting the dates from the pivot table column headers into my "counting"/analysis table header.
What I would like to do is use the UNIQUE formula to get the dates worked - BUT, I want the spill area to go along the row so the dates are column headers. Okay, I probably could have made that a shorter ask, but I hope explaining a little of what I'm trying to do helps. I want the dates to automatically update when I paste new payroll/hours worked data into the data table, the same way the employee data updates.
The key is to TRANSPOSE the UNIQUE formula, not the data:
=TRANSPOSE(UNIQUE(A1:A9))
I cannot find anything about having the spill area go along a row instead of down a column. My workaround for this was to create a column of unique dates next to my data table. Since the data is in a table, the unique dates will update automatically when the table is updated. I used the Offset formula to pull the dates into my column headers from the column of Unique dates next to my data table. I will say, while this setup is easier than updating via the pivot table, it is a formula heavy workbook now.
For the data headers I used : "=OFFSET('Data Table Tab'!$U1,Column()-5,0)". The "rows to offset" portion of the formula is "Column()-5". My first date header is in column 5, so as it is copied to the right this will increment the number of rows to offset from the first date.
At this point I will just need to copy the formulas over to the right to update my analysis table.
I would be surprised if someone else out there just starting to work with the new Dynamic Array formulas in Excel doesn't wonder about the same thing. If you stumble across this question and have a better solution, please feel free to share it with me.
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.
I would like to present some data in Excel in a table. I have a sheet with three columns: date, time_spent and user_id. Every row is a data record. I want a table with a column for every date and every value with time spent below the date.
Using the transpose function under paste special I get this:
However I would like only one column per unique date, so the amount of columns decrease like this:
Does someone know how to do this?\
I have more than 10000 rows, so manually is too much effort...
Using Pivot Tables as Tim Biegeleisen suggested I cannot get what I want either, I'm not an expierenced user of Pivot Tables so probably I'm doing something wrong:
Excel file as shown in above picture
Here is one way of using a Pivot Table as suggested by Tim above in the comments, but you must use it on your original, non-transposed data: (and note which parameters go to which areas.
A disadvantage of the Pivot table is that the column headers are text strings and not dates. If your version of Excel is 2010+, you can use Power Pivot or Get and Transform to do a better job:
Open the Query Editor, change the format of the Date column, and Pivot the column:
Then Save the results:
Advanced filter dates to unique values in a new column
Copy and transpose them to make your column titles
Insert a new column B with the formula =TEXT(A2,"yyyyddmmm")&COUNTIF($A$2:A2,A2) and fill down
Below your new column headers put in the formula =IFERROR(VLOOKUP(TEXT(H$1,"yyyyddmmm")&ROW()-1,$B$2:$C$8,2,FALSE),"") and fill down and across. You will need to fill it down to cover the maximum number of instances of each date.
Adding a sumif to this table and your initial table would be a good way to check you got everything.
Is it possible when pivoting a series of data to calculate the difference between 2 columns when 1 column is your column filter? for example, I'm trying to compare 2 accounts receivable reports a week apart, so I inserted a manual column in both reports called "week" and then, before pivoting, I consolidated the 2 reports. Now I have 1 column called "week" with 2 different values. When I pivot, I want to put the "week" column in the Column Filter and I want to put the outstanding balance in values, and I then I need to calculate the difference between the weeks. I can't seem to find a way to do this.
Thanks,
Assuming you are using MS Excel ...
From your description, I believe you have a raw data table that looks like this ...
... and a PivotTable that looks like this ...
If you were looking to calculate the difference between Account1 and Account2 on a weekly basis, this would be straight forward, using a calculated field. However, in order to calculate the change in Account 1 week over week, and the change in Account 2 week over week, you will need to go back to the raw data table and perform the calculation there, in new columns.
In the raw data, Column A is Week, Column B is Account1, and Column C is Account2 ...
Make header in Column D Acc1WkChng and the header in Column E Acc2WkChng
The first row of each of these columns is 0. The second row of Acc1WkChng is =B3-B2. The second row of Acc2WkChng is =C3-C2
The raw data table now looks like this ...
On the PivotTable, pick the PivotTable Tools -> Analyze Ribbon. Choose Change Data Source and increase the selected range to include Columns D and E.
Add Acc1WkChng and Acc2WkChng to the Values area. Format accordingly.
The PivotTable now looks like this ...
Note: This pivot table is merely a transpose of the original data. Presumably, you want to do something more interesting with it.