This question already has an answer here:
How to compare dates or date against today with query on google sheets?
(1 answer)
Closed 5 months ago.
I have a Google Spreadsheets document with two sheets in it. The first sheet is where I want to run my query. Located in cell B1 is today's date with the formula =today(). I have headers in row 2. So I want the query to start in A3. My information is in the second sheet cells A38:M1267. I only want the query to pull columns B, D, F, K. Column A has the dates. I want to run the query based on today's date and match all the dates in column A of the second sheet and return the values.
The query formula I have tried:
=QUERY(Season!A38:M1257,"SELECT A,D,F,K, Where A ="&B1&"")
keeps coming up with #Value. I have spent the last few hours trying to rewrite it to get it to work and I just don't know what is wrong.
Please try:
=QUERY(Season!A38:M1257,"SELECT B,D,F,K where A = date '"&text(B1,"yyyy-MM-dd")&"'")
Related
I have a column that shows the date a task was completed. Some rows are blank, which means the task is still being worked on (and can be disregarded)
I am trying to write a measure that counts the number of rows which are between a start date and an end date. For example, in the table, there are three rows which are 10-aug-2022. I tried the following
Closed Tickets = COUNT(datesbetween(Issues[ISSUE_RESOLVED],DATE(2022,07,09),DATE(2022,08,11)))
I get the error that The COUNT function only accepts a column reference as an argument. I need the number 3 returned.
I think I need to use a different function to count if (since I want to specify a particular date in the expression and not reference another column). I was working on the following, but I cant get the right syntax
Closed Tickets = calculate(COUNT(Issues[ISSUE_RESOLVED],FILTER(Issues,Issues[ISSUE_RESOLVED]>=DATE(2002,08,9)&&Issues[ISSUE_RESOLVED]<=DATE(2002,08,11)
Any help would be appreciated :)
edit - I also tried the following
Closed Tickets = COUNTROWS(FILTER(Issues,Issues[ISSUE_RESOLVED]>=DATE(2022,8,11)&&Issues[ISSUE_RESOLVED]<=DATE(2022,8,11)))
But Im getting in my table when expect 12
Found it.
Closed Tickets (JULY) = COUNTROWS(FILTER(Issues,Issues[ISSUE_RESOLVED]>=DATE(2022,7,15)&&Issues[ISSUE_RESOLVED]<=DATE(2022,8,15)))
I am new in R and already found a lot of answers on this site, but with this one, I am stuck.
I have a table (in Excel, see image in link) that gives me a value (called c) based on class (0 to 6) and start date (17/2018, 1/7/2019, 1/7/2020 and so on). In my dataframe there is a colum 'date' and a column 'class'. For every row in the dataframe, I need to find the corresponding c-value (so if class = 2 and date = 15/10/2018, I need the value 659,86 in a new column).
I have to problems:
- when importing the data in R, it sets an "X" before the date
- I don't know how to do the lookup with dates (with exact values, I manage with merge).
Hope my question is clear and somebody can help me.
Thanks!
steven
I am totally new to R environment and I'm stuck at Date operations. The scenario is, I have a daily database of customer activity of a certain Store, and I need to extract last 30 months data starting from current date.
In other words, suppose today is 18-NOV-2014, I need all the data from 18-OCT-2014 till today in a separate data-frame. To extract it, what kind of iteration logic should I write in R?
You don't need an iteration. What you could do is, assuming your data.frame is called X, and the date column, DATE, you could write:
X$DATE=as.Date(X$DATE, format='%d-%B-%Y')
the 'format' argument is to match your date format you specify in you question. Then, to get the lines you are interested in, something like:
X[X$DATE>=as.Date(today(),format='%d-%B-%Y')-30)]
which is all the lines that are after today - 30 days.
Does this help at all?
I have an SSRS report and I have a table there, in which I have a column named as No. Of Days which are lying between two dates. I am getting those dates (datetime) through datasource but don't know how to calculate number of days between these two dates in a tablix cell formula.
The following will get the difference between two dates:
=DateDiff("d","01-Jun-2011","10-Jun-2011")
which results in 9.
In a table cell it will be something like:
=DateDiff("d",YourDataSet.Fields!FirstDate.Value, YourDataSet.Fields!SecondDate.Value)
I have a column of year values by which I am sorting. I'd like to find the quantity per year (read: number of repeats of each year value). I'd like to chart said values. I'm not sure how to make this happen.
I am using Apple's Numbers '08, but if possible a general solution that multiple people could use would be preferred.
You should use the countif() function: http://office.microsoft.com/en-us/excel/HP052090291033.aspx
I did a similar thing to count how many hours of work there are for each upcoming version of my iPhone app. I was doing sumif(), but you just want countif().
See cells N4-N6 here: http://spreadsheets.google.com/ccc?key=0AhL0igVI9HVNdGpaS3U1cS1qOGVNd3h0Slg0a21vUWc&hl=en
On a new sheet, list the unique years in one column, then their quantity count in the column next to them. Select the entire range created, then create a chart.
I'm unsure from your question what you would specifically need more than this (and I work in Excel 2003).