I need to create a formula that takes data from pivot table and the data is automatically update when I drag the formula across in my table (picture 2).
My pivot table looks as below:
My table is as below:
My GETPIVOTDATA formula is as below:
=GETPIVOTDATA("Is it valid?",'Pivot Tables from Data 1'!$A$3,"SITE","London","Is it valid?",Yes","Credit Week",247)
I tried to amend my formula and add 247+COLUMN()-2) but it doesn't work. I think the problem is the format of date in pivot table but I'm unable to change it.
Thanks
Try this, it replaces the last argument (247 aka days in year thus far) with a formula to calculate the same:
=GETPIVOTDATA("Is it valid?",'Pivot Tables from Data 1'!$A$3,"SITE","London","Is it valid?",Yes","Credit Week",A1-DATE(YEAR(A1),1,0)+1)
Replace A1 with whatever cell the 3-Sep-18 is in and copy to the right.
Related
I am using a PivotTable, and using the GETPIVOTDATA formula to populate
data on a separate worksheet. Some days there is no data for this particular pivot table column. Is there a way I can include with my GETPIVOTDATA statement, that if it shows an error
or #REF! it will reference another cell in that pivot table. I tried an If(And) statement and it did not work.
Here is the current formula=GETPIVOTDATA("Disposition",'ACD Service Levels Pivot'!$A$3)-GETPIVOTDATA("Disposition",'ACD Service Levels Pivot'!$A$3,"Application","CallbackQueue")
The reference cell I would like for error #REF! to go to is GETPIVOTDATA("Disposition",'ACD Service Levels Pivot'!$A$3)
Thank you
#usmanhaq Thank you for the comment. My goal was to make the formula logic dependent on the pivot table. However, I created a "helper table" using iferror. In which when the pivot table does not have the available data, the helper table will show "0". I can proceed with writing the formula to look at the helper tables "0" instead of the Pivot tables "#REF!" error it throws when no data is available using GETPIVOTDATA. Thanks for leading me down the path.
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.
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.
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.
-
I have a tabular data with values as in picture. I created a pivot table in excel 2007 .How can I get count value of each up/Down for date specified. I tried to by making one column row and other as values but it would not work.
The result would be:
A better solution is to use a countif function on a second tab. something like
=COUNTIF(Sheet1!A:A,"UP")
and
=COUNTIF(Sheet1!A:A,"DOWN")
and copy it across the range of dates.
If you can format your data differently to look like this
Then the pivot table becomes easy withthe following settings