I am working on logistics data. I have booking being made throughout the day at regular intervals from start to the end of the day.
Now these booking are consistent and I have time from like
04:45
21:10
21:10
06:07
05:44
05:45
05:45
05:45
etc.
Now as there are multiple bookings I need to group them such as
04:00- 05:00 (1 hours)- this should capture all booking made during this period.
Similar for other hours during the day.
By doing this I will be able to group individual values into specific group. Can you please advice how to achieve the same in excel.
If the values are stored as dates in Excel, the Pivot Table has this functionality built in already with the "Group Field" option. You can group by Hours which is probably what you want. Note that you can select multiple items to get a hierarchy of groups as shown below. This will break if the underlying data is not formatted as a Date so watch out for that.
If you do not have true dates and just have times, you can format as a Time in Excel and it will work. Just don't show the days/date because it will be gibberish.
add a column truncating the time to hours
along the lines of =time(hour(z),0,0)
then create a pivot table using the hour column
Related
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
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.
I have a power pivot table with a date time entry (which can be changed to any-type of output with a case statement) Format (2012-01-01 00:00:30.000) Which I need to figure out how many of these entry's for any day arrived from 1:00 Am to 1:59 A, and 2:00 am to 2:59 am etc?
How do I format the Bin frequency in excel so I build the hour buckets?
I do want to graph more than one day but that could be done on the SQL side.
You might need to make a new table to chart the frequency distributions. Here's an example.
The formula
=COUNTIFS(A$2:A$17,"<"&F6,A2:A17,">="&E6)
will provide what you want. You can adjust the limits for min/max with the chart shown. Sorry, I couldn't figure out how to easily share the excel file.
As an alternative to the other answer which is valid, you can create a pivot table based off of your data and then group it by right-clicking anywhere in the pivot table, selecting "Group..." and telling it how you want to group the data. You can group by Months, Days, Hours, Minutes, etc...
This is a multi-tiered project. Let me give a quick overview. I have attendance data, card/ timestamp punches. I would like to have a pivot table with slicers in Excel. Ideally you'd be able to choose a department / last name / associate number. And also a period of time. Ideally this would be a table with the company period/week. And maybe default to last weeks.
I can get at timecard data in two ways:
(1) generate a CSV that automatically performs the timecard math, to figure out how many hours someone worked and it is smart enough to understand 3rd shift workers. The format of that CSV is:
Last Name, First Name, Personnel Type, Associate Number, Facility, Department, TimeIn, TimeOut, Total Hours
The problem with this method is that I would have to manually append the information to the CSV tables. Or come up with some autoIT script.
(2) Get at the raw data via sql/odbc. This way the math is not done. It is just all of the associates timestamps. I would have to figure up the daily hours myself and figure out a 3rd shift formula too. It is not a set schedule, many people swing shifts and others get called in a lot.
Lastly, I would like to be able to filter the dates by using our company fiscal calendar. I have a spreadsheet that goes from 2000 to 2093. With everyday listed and it's corresponding year/period/week.
Example period info spreadsheet:
date Year Period week WeekTotal Period Total
12/3/2007 2008 1 1 2008.1.1 2008.1
12/4/2007 2008 1 1 2008.1.1 2008.1
I know there is a lot going on here, but what would be the best way to approach this project?
First I have not been able to post any script however the last I tried it I used two options 1. Was a php conversion where the time was numbers ( which makes it easier for calculations)
2. Was in the tables where I deliberately entered the values places the time in different columns or fields for hours, mins, and seconds this meant that while the input is eased I still have to calculate the output in php especially for totals, averages and differences.
Hope it helps a bit