Adding columns to a pivot table in excel - excel

I apologize if my question is vague or was asked before. I have the below table in a spreadsheet
Region Next Service Date Duration Type Duration Frequency
New York 12/4/2013 Year 1
The spreadsheet has 4 columns and what I would like to do is to create a pivot table and somehow project the next 24 months service duration on the pivot table so the output would look like the below
Count of Unit Serial Number Column Labels Continue for
Mar-13 24 Months…
Region
New York Count of Services
Basically, I need to show the count of services for the next 24 months without editing the datasource tab of the pivot table.
As far as I know, you can't add columns to a pivot table.
If someone gives me an idea of how to add columns based on the duration and duration frequency to a pivot table, that would be a great start point.
Thank you all for your feedback and sorry for the misformatted tables

Use this formula
In cell A1 of Sheet2
=Sheet1!A1
Copy and paste as needed, you now have a duplicate of the data sheet, "without editing the datasource".
Create your formulas for projection info on Sheet2, and use Sheet2 as the source for the Pivot Table.
Be aware lots of formulas can bog down Excel, so if at all possible I would put your formulas for projection info on the datsource tab (Sheet1) and hide them. You will still be able to use them in the Pivot table when hidden.

Related

PowerPivot and dax formulas

new to this but i need some help with PowerPivot. I have recently created a PowerPivot to pull through 3 different excel documents that will be updated automatically each week with new data. They all have at least 2 of the same unique codes to be able to link them together.
I have managed to link all the files together and create a pivot to show the relevant information from each file under one pivot. my problem is now I need to add some formulas that relate to the actual data in the pivot.
Q1:I need the average of the last 4 weeks of data from the pivot but i need the formula to be able to shift when the new weeks are added.(if there is a way to do this with a dax formula that would be very good as well.
I have dates and weeks in the data set.
Basically I'm after knowing if I am able to create formula next to my pivot that will shift the the data grows or changes.
currently the pivot looks like the picture attached.
I have also attached a pic of the data
Q2:How do i get the pivot to only show me the last 4 weeks nothing else
if anyone has any suggestions on how I could get any of this to work that would be amazing.
Thank in advance power pivot datapivot table
Q1: what i have tried -I have tired to add formula next to the pivot but it breaks or gets deleted when the the pivot updates
Q2: I have created a slicer and I manually change it

Excel Dynamic Array Spill Area - can it go along a row or just down a column?

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.

Finding the total sum based a few criteria

I am currently working with the following excel workbook:
Workbook 1
I wanted a feature where I can find the total number of doors that need fixing, but based on Brand and Model of the cars. For example in the workbook, there are 5 Honda Vios (Blue) that needs to fix 1 door, then 2 Honda Vios (Red) that needs to fix 2 doors. Therefore, is there any formulation (sumifs / countifs) that I can use so that I can easily find the total number of doors that need fixing?
In cell G2 add this formula:
=COUNTIF(E2:F2;"YES")*D2
And drag it down.
This will count the number of doors on this row.
Then create a new table with the unique items and add the following formula which will sum all blue Honda Vios doors.
=SUMPRODUCT((A:A=M2)*(B:B=N2)*(C:C=O2)*G:G)
If "ES" is included:
=(IF(ISNUMBER(FIND("ES",E2)),1,0)+IF(ISNUMBER(FIND("ES",F2)),1,0))*D2
Regarding pivot table.
First make the table a official table by clickin on a cell in the table and go to insert -> table
Then again, click inside the table and go to insert -> Pivot table.
(To make it easier I added the pivot table on the same sheet)
Now set up the pivot as following:
When you add new items to your table, the pivot table must be refreshed.
Click on pivot table and go to Analyse -> refresh

Excel - to format the data in a more readable way

Is it possible to get the above table in a format such as the table below, in a much easier manner without having to do a brute force approach of creating 9 columns for the LTV band and assigning it a PD value in the table?
Excel... Insert Pivot table
Select range and fill in as layed out in image below.
you can hide grand totals if you want by right clicking on the pivot table and selecting Pivot table options then the totals & filters
There are many other features as well but this gives you the general idea.
As to missing LTV values, you just need blank rows for each value so the chart pivots on all the data.
OK, Here's an idea
You can do what you want using a complicated index formula that checks the Year and the Month and other number but it's quite complicated, so.
Use a formula to create an ID column to the left of your data and you can use a fairly simple vlookup to extract the data.
The ID will be the YEAR + MONTH + B + I.TV number. On my sheet the formula is.
=C2&D2&"B"&E2
Next create your new table by listing the Years and Months and entering in the headings B1 to B9. Then put your vlookup in the first cell under B1.
=iferror(vlookup($A12&$B12&C$11,$B$2:$F$9,5,false),"")
It's not too complicated, $A12&$B12&C$11 builds the ID we want to search for using the Year, Month and Heading B1 cells. Pay attention to the way the cell references are locked as that allows you to autofill across and down while still referencing the headings etc. $B$2:$F$9 is the range you want to use for the vlookup and 5 is the column with the data you want to return.
Have a look at my example below.

Excel Pivot Table Exclude one Row in Calculated Field

In Microsoft Excel I want to have a pivot table that uses a calculated field for a row. I would like the calculated Row to exlude the current year. So I want two summary rows one with current year and one without. The attachment in orange shows my desired result.
I know I can manually make the cell formula for each month, but I would like it to be automatic. Any thoughts?
If your row variable was called "Year", your column variable called "Month", E1 was one of the cells in your pivot table and your values variable was called "Score", you could do something like
=GETPIVOTDATA("Score",E1,"Month","Jan")-GETPIVOTDATA("Score",E1,"Month","Jan","Year",YEAR(NOW()))
and repeat for each month.
However you would need to leave room under the table for it to expand to avoid over-writing your orange cells.
The only other way I can think of is the obvious one of copying the whole pivot table and filtering on row labels, excluding 2015.
You can copy a pivot table by selecting the whole table (can use Ctrl Shift *), right-clicking, selecting Copy and then pasting it somewhere else.
This is a mini-example showing the two methods.

Resources