I have some data that has multiple columns for simplicity lets call them "start" "End" and "duration". Duration comes pre calculated.
However I would like to show my data in daily or at least weekly figures. The data could be anything spanning several hours to several weeks or months. What would be the best way to get this data separated in this form?
I currently have extra columns calculating the part-duration for the new month but obviously with days or week it becomes quite cumbersome
Related
I'm new to Excel so I don't know if it's even possible to do what I'm trying to.
I wanna build a graph with 3 columns of direct data and the last one should be an average of older data and every week I should add a new column with a newest one and that should update the graph becoming the first column, sending the previous one to the second one and so on until the previous 3rd one becomes part of the average column. I'm uploading some images to make things clearer.
Sorry about the paint images =/
If not clear, the average should be the mean values of all older columns and my graph should have always 4 columns no matter the amount of older ones.
I am open to other implementation methods that could give me a similar solution.
I have been downloading and organizing hourly water quality data into Excel for many different states, and have organized them by year. I have done data prep for them to make sure there are no zeros/every day of the year (DOY) has 24 values, but the time series plots were too noisy so want me to get the daily average values instead.
All of the sites annual data is different in terms of how many days are available, and sometimes they are missing whole months due to no recordings.
So my question is, how can I develop a code to give me the average daily value linked to a specific DOY that I can apply to many different Excel sheets. The data appears like this:
And the files are saved like like CA1_2012 (California Site 1 hourly data from 2012)
I know there is a lot on this topic but I have been trying everything and I can't get a code that works!
You can get the summation of the second column based on values in the first column in matlab using accumarray;
[m,~,n] = unique(data(:,1));
sumdata = [m, accumarray(n,data(:,2))];
for mean I would suggest grpstats:
avgdata = grpstats(data, DOY, {'mean'});
or as #gnovice suggested:
avgdata = accumarray(DOY, data, [], #mean);
You can also get what you want by using Pivot Table in excel and group data by DOY and get the mean value for them in the table. (No coding required).
I have about 160k rows of data which consists of temperatures and flow rates. I need to get it down to being a bit more manageable. I would like to have an average temperature and flow rate each hour instead of several values each minute. I'm not much of a programmer but I don't think this would be a problem if it were the case that I had the same amount of measurements each hour, which is not the case. Each hour has between 200-400 data points and I'm not sure how I would go about this problem. The output I want is something like
date - hr - average1 - average 2 ... and so on.
How the sheet looks
Does anyone have a suggestion of how to go about this?
Sincerely,
This is how it looks in a pivot table. I've put in some dummy data which has two different days and two different times to test it.
To get the date without the time I've used
=floor(B2,1)
because date-times are stored as decimal numbers where the whole number part contains the date and the fraction part contains the time.
To get the hour I've just used
=hour(B2)
My test data looks like this
and the resulting pivot table looks like this
I had to use Value Field Settings and Number Format to tidy up the formatting of the date and average columns.
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.
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