Excel date-time auto fill error - time-series

I have data of 10 metrics for a 24 hour period which is in 5 minute intervals. I merged all the 10 data metrics into one file and converted it into a .xlsx file.
After opening the excel file I created date-time column, filled 2 values and tried to fill the rest with Auto-fill option in excel. But the problem is after several rows the 5 minute interval changes to 4 minute interval,
Example:
18-11-2019 10:10
18-11-2019 10:15
If I try to auto-fill this data till the last column this is how the data changes,
18-11-2019 10:10
18-11-2019 10:15
18-11-2019 10:20
18-11-2019 10:25
.
.
.
18-11-2019 12:15
18-11-2019 12:19
18-11-2019 12:24
18-11-2019 12:29
When I click the 12:19 row, It shows 18-11-2019 12:19:59.
It'd be helpful if someone explains why this problem occurs, and the solution?

Related

Google Sheets - Formula to reference next cell in same row

I have two columns where I cam looking up a value in another sheet for date and value. The values are in rows and I want to display the results in columns.
How the source data looks
How I'm pulling it
I can't figure how to make the formula drag down where Column value changes, but the Row value stays the same. Meaning, AA1 would drag down to AB1, AC1, etc.
105 Weds Feb 1 at 9:00 AM
101 Weds Feb 1 at 12:00 PM
115 Weds Feb 1 at 4:05 PM
111 Weds Feb 1 at 9:40 PM
116 Thurs Feb 2 at 12:05 AM
97 Thurs Feb 2 at 1:20 PM
='Data'!B1 ='Data'!B3
='Data'!C1 ='Data'!C3
='Data'!D1 ='Data'!D3
I've tried using an array and it works for the displaying the next value in the Column, but not the next value in the Row like I want.
I've also tried some scripts I was able to lookup but wasn't successful.

Pull data from big query to google sheet every Sunday at 11:59 pm for the last 21 days

It needs to pull data from BigQuery to Google Sheets every Sunday at 11:59 pm for the last 21 days.
Here's the code I wrote to find out Sunday.
SELECT
 EXTRACT(YEAR FROM date) AS year,
 week,
 name,
 parent_name,
 sum(total_sales) as total_revenue,
 title
 FROM partitioned_ts
WHERE
 id=14213
 and
 total_sales>0
 and
date BETWEEN DATE_SUB(CURRENT_DATE(), 
             INTERVAL 
             IF( EXTRACT(DAYOFWEEK FROM CURRENT_DATE()) = 1, 
                 6, 
                 EXTRACT(DAYOFWEEK FROM CURRENT_DATE()) - 1) 
             DAY) - INTERVAL 21 DAY AND DATE_SUB(CURRENT_DATE(), 
             INTERVAL 
             IF( EXTRACT(DAYOFWEEK FROM CURRENT_DATE()) = 1, 
                 6, 
                 EXTRACT(DAYOFWEEK FROM CURRENT_DATE()) - 1) 
             DAY)
GROUP BY name, parent_name, week, year, title
order by year DESC, week DESC, name
This query will process 85.31 GB when run. The old version of the query calculates the last 21 days from today
date BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 21 DAY) AND CURRENT_DATE(
and this query processes only 1.6 GB when run. How should I write the query to process lower data?
The easiest way to filter out rows older than 21 days would be:
DATE_DIFF(CURRENT_DATE(), date, DAY) <= 21
If you need to reduce the scan size, the best approach is to partition the source table by date
https://cloud.google.com/bigquery/docs/querying-partitioned-tables#use_a_constant_filter_expression
The following code works:
date BETWEEN DATE_SUB((DATE_TRUNC(CURRENT_DATE(), WEEK(Saturday))), INTERVAL 21 DAY) AND (DATE_TRUNC(CURRENT_DATE(), WEEK(Saturday)))

Neo4j creating nodes and relationships from Bus route CSV

I have a CSV file with bus route information that looks like this. I am having trouble creating nodes and path relationships in Neo4j with it in this format.
I would like to have nodes for the stops and routes, and routes between them using the sequence and route detail id to show the direction of the routes.
RouteName
route_detail_id
Stop
Sequence
Arrives
Departs
Bus1
50701
Cherry
1
9:00
Bus1
50802
Market
2
9:30
10:00
Bus1
59003
Raleigh
3
10:30
10:50
Bus1
59004
Stuart
4
11:05
11:30
Bus1
58006
Possum
5
12:30
Bus2
67003
Cherry
1
11:00
Bus2
67004
Market
2
11:30
12:00
Bus2
67009
Raleigh
3
12:30
12:50
Bus2
67010
Stuart
4
13:05
13:30
Bus2
67011
Possum
5
14:30
Bus3
89004
Highland
1
9:00
Bus3
88005
McKinley
2
9:30
10:00
Bus3
67098
Jersey
3
10:30
10:50
Bus3
4500
Ridgewood
4
11:05
11:30
Bus3
67890
Osprey
5
12:30
route_detail_id is the unique identifier for that particular stop on that particular route.
I would like to be able to use the times for shortest path queries in the future, but right now would just like to be able to create a structure and visualize in neo4j.
Eventually it will be used to create connecting routes, and shortest path searching, but right now I am just stumbling over even converting information in this format to Neo4j.
I would start by converting the format into a list of nodes connected by arcs, such as:
Cherry -- Bus1, 50701, n/a, 9:00 --> Market
Market -- Bus1, 50802, 9:30, 10:00 --> Raleigh
...
Cherry -- Bus2, 67003, n/a, 11:00 --> Market
..
This seems to me to be a more natural way of representing the data, as you have stops (nodes), which are connected by bus routes (directed arcs, with route details).
You can then query the database by looking for links between the nodes. You can convert also convert the arrival/departure times into the duration of the journey between two nodes if you want to find a shortest path.

HighCharts - Column style, interval of 5 minutes

I want to display a Highcharts.com column-style chart with a column interval of exactly 5 minutes. My database contains data for every minute. Now I see irregular gaps of sometimes 6 or 7 minutes in my chart. So e.g. 10:05 a.m., 10:10 a.m., 10:16 a.m., 10:21 a.m., etc. etc. Where do these gaps come from and why is the data not consistently read from the database from 0:00 a.m. to 12:59 p.m. in 5 minute intervals?

Spotfire Day Counter Time Series

I am attempting to load some oil and gas production data into spotfire. This data is currently in a time series, ie one column has well name, another has production values (bbls) and then one column has months and another years( I also have a concatenate month/year column). I would like to create another calculated column that contains a day counter, I.e. May 1974 would be day 1 and then June 1974 would be day 32 and so forth.
In excel I would do this with an if statement and reference preceding cells, but being a bit new to spotfire I am unsure how to do this.
Could someone please point me in the right direction? Suggest some functions?
Thanks for the response scsimon.
I solved my problem by creating a case statement for the days in each month and then summing over the days per well for all rowIDs.
case [Month] WHEN "JAN" then 31 when "FEB" then 28 when "MAR" then 31 when "APR" then 30 when "MAY" then 31 when "JUN" then 30 when "JUL" then 31 when "AUG" then 31 when "SEP" then 30 when "OCT" then 31 when "NOV" then 30 when "DEC" then 31 end
Sum([c.Days in Month]) over (Intersect([Entity],AllPrevious([c.rowID])))
This gave me the desired response.

Resources