I have a pivot table with monthly run-rate forecast.
e.g. on the 5th of Jan it would be [number]/5 *31
I change it every week so 5th/ 12th/19th etc.
Only problem is I have lots of fields like this and lots of tables and lots of sheets. Is there any way to update the calculated fields in bulk?
Thanks
You should consider now() formatted to give the week. Then call that value in your calcs... should update with every change of week
Related
I am trying to show revenue per month for a number of rental contracts that run for months or even years. Those contracts have a start and end date and I want to show per Month how much is coming for a given year.
This is the source table:
This is what I want it to look like:
Have only managed to do it in an ugly way with an intermediate table but there must be a proper way to do this in a Pivot table, right?
Thx for your help!
Have tried many ways in a pivot chart but using the start and end date as filters is giving me very odd results with only data being shown when a contract starts or ends.
My goal is to have a count of three different dates by month in a bar chart. Currently we are using a count if formula then building the chart above that, would like a cleaner solution. I have three columns, Open, Action, and closed dates. Adding all three to the axis doesn't produce the right results. I'm stuck. Is there something in the pivot that I can change? I'm pulling the data in via Power Query, is there something there I can change? Many thanks :-)
Ideal state
Recent Action and Closed dates are not show up, that seems to be the real issue. Why and how to fix it?
Sample of data
Created a date table in Power Query.
Also in Power query, duped my data then deleted all but the columns I didn't need.
Unpivoted the three date columns.
Joined the new date to the date table.
Graphs fine.
I'm looking a way to add an extra column in a pivot table that that averages the sum of the count for the months ("Count of records" column) within a time period that is selected (currently 2016 - one month, 2017 - full year, 2018 - 5 month). Every month would have the same number based on the year average, needs to be dynamically changing when selecting different period: full year or for example 4 months. I need the column within the pivot table, so it could be used for a future pivot chart.
I can't simply use average as all my records appear only once and I use Count to aggregate those numbers ("Count of records" column).
My current data looks like this:
The final result should look like this:
I assume that it somehow can be done with the help of "calculated filed" option but I couldn't make it work now.
Greatly appreciate any help!
Using the DataModel (built in to Excel 2013 and later) you can write really cool formulas inside PivotTables called Measures that can do this kind of thing. Take the example below:
As you can see, the Cust Count & Average field gives a count of transactions by month but also gives the average of those monthly readings for the subtotal lines (i.e. the 2017 Total and 2018 Total lines) using the below DAX formula:
=AVERAGEX(SUMMARIZE(Table1,[Customer (Month)],"x",COUNTA(Table1[Customer])),[x])
That just says "Summarize this table by count of the customer field by month, call the resulting summarization field 'x', and then give me the average of that field x".
Because DAX measures are executed within the context of the PivotTable, you get the count that you want for months, and you get the average that you want for the yearly subtotals.
Hard to explain, but demonstrates that DAX can certainly do this for you.
See my answer at the following link for an example of how to add data to the DataModel and how to subsequently write measures:
Using the Excel SMALL function with filtering criteria AND ignoring zeros
I also recommend grabbing yourself a book called Supercharge Excel when you learn to write DAX by Matt Allington, and perhaps even taking his awesome online course, because it covers this kind of thing very well, and will save you significant head-scratching compared to going it alone.
How do I filter data for specific individual dates in a PivotTable? The input is changed on a weekly basis and therefore the specific desired dates will change every week. I have data for every business day. And I want to retrieve data from the most recent business day, 5 business days before that, 30 business days before that and 90 business days before that. How do I go about this?
Sound like you want an 'Aging Report' If you Google on 'Excel Aging Report', you should be able to find something. use of TODAY() in formula is part of answer. I also did something similar here. It didn't involve Pivot tables.. But it should help you on your way.
You might want to check out the code in my answer at Filtering pivot table with vba
That code lets you programatically filter a Pivot RowField or ColumnField by specifying an interval type (e.g. days, weeks, months, quarters, years) as well as an interval count (e.g. 7, -7). It has an optional argument vRelativeTo field which counts back/foward from the youngest/oldest item depending on whether lNumber is positive/negative.
It leverages off the inbuilt DateFilters functionality, and as such does not
work on RowFields.
I'm creating a file to track the dates and times of arrival of documents. THe data that I have is fed to the pivot table. The options for grouping data allow me to group them by days, months etc. What I need to achieve is different.
I would like the dates to be grouped as follows (by arrival date):
-today,
- yesterday,
- two days ago,
-more than two days ago.
I tried to create calculated fields but I was unable to write a proper formula.
Is there any way to achieve that?
Thanks.
If the dates are in the column A, I would write sometnihg along the lines of:
=IF(TODAY()-A1=1,"yesterday",IF(TODAY()-A1=2;"two days ago");"more than two days ago")
It is hard to give a definitive answer because you didn't provide any insight into what your data looks like, like a screenshot.