Text field is not parsed into date in google data studio - google-sheets

I'm having a google sheet file, that contains several columns. One of these columns is Date. After loading this sheet into google data studio, I found that this field Date is detected as Text. I tried to to cast it manually using GDS but it failed. So I decided to create another field Date_d using parse_date function in GDS, but it fails too.
The weird thing, is the original field Date, when I read it in GDS, it doesn't look in the same sheet format:
Sheet format column values:
When I read it in GDS:
Based on this I tried to use 2 formulas for the new casted fields:
PARSE_DATE("%Y%m%d", Date) and PARSE_DATE("%m/%d/%Y", Date) but both fail to be read by GDS:

The solution was that you should specify the column type as a String in the google sheet.

Related

Import values with certain date into new worksheet tab in Google Sheets

I am scraping a Twitter account and listing the results in a Google Sheets table. The publication date of each tweet is added in a separate column in the format YYYY-MM-DD hh:mm:ss.
In a new worksheet, I want to list all of yesterday's tweets. I tried doing so by the following command:
=FILTER(Worksheet1!A1:B; Worksheet1!B1:B>TODAY()-1)
Unfortunately, the command doesn't work correctly. It copies all the data from Worksheet1 into the new tab. Does anyone have an idea where I made a mistake?
To filter yes'day tweet data from the raw data try:
=FILTER(Worksheet1!A:B,INT(Worksheet1!B:B)=TODAY()-1)
If its still throwing an error I'd double check the date to see if its proper date format compatible for formula based calculations OR text Date!

Debug a numeric value in a date column SQL

I have a couple of queries running in Google Sheets via Supermetrics.
These all have a column with the date ('2020-05-26') and a numeric column Cost ('3450')
Sometimes in rerunning these queries one of the rows does not show a date format, but a date formatted as number, e.g. '43976' for 2020-05-25. I am importing the sheets in Big Query, but when importing the date column as a date format, I get an error whenever there is one row formatted as a number.
I tried using an arrayformula in Google Sheets to overcome the formatting issue there, but that does not work since you cannot import a column with aan array formula in Google sheets.
I tried importing the column as a string, that works. Now however, I need to make sure all rows are recognised as a date. I used the following formula to change the string into a date, but again that one row formatted as '43976' will block the whole query.
How do I convert a string column, with both values formatted as a date "2020-05-25" and values formatted as a number '43976' to a date column? Thanks for your help!
Hereby a screenshot; however, the formatting is overwritten by the supermetrics query that is run daily, so just changing the formatting in the column here won't help (it will fix it for this day, but not going forward) - I've tried that already..

Data Studio date range that filter on Google Sheet Column

I'm using Google Sheets, and wanted to do a Data Studio "real time" report, based on the data in the sheet.
The sheet contains data from an issue management program.
My data in the sheet exactly:
Issue type (string), Work time (number), issue created at (date), issue resolved at (date)
I successfully created a pie chart that's dimension is: Issue type and metric: Work time
I can see that all the data in the pie chart.
Now my problem is:
I can't filter this chart with a date range.
The date is in a correct format: YYYYMMDD
but I can't describe to data studio, which date column it should filter when I set a date range in the control.
Is it possible some way to create two date range filter and one of them filter on created date, and the other one filter on resolved at date?
Thank all of you!
Roland
Check to make sure that the date range you're filtering by is the first date column from the left in your Sheet. If it's not, then Data Studio gets confused and doesn't work properly.
I'm not sure if you can have two different dates in two different filters. The graphs wouldn't know which filter to follow.
Finally I deleted the connection between the sheet and the report, and started again everything, and it works fine. I think I created the connection when the date was not in a correct format, I changed it after making the connection.

Google Sheets Formula cannot get the date from another cell

I want to get the price of bitcoin on exact date.
The dates are written in Column A and they are updated regularly from a Google form
This is an example of the working formula, but the date in it is written manually (2017-01-31):
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",2017-01-31)))
But when I try to get the dates from Column A, mentioned with $C$2:$C - Google sheets do not understand it
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",$C$2:$C)))
Click here to check The spreadsheet
Thank you in advance!
"Doctor, it hurts when I do this."
In the example spreadsheet you are converting the dates into text for the column C, using the explicit TEXT() function. Then you are wondering why they no longer work as dates?
Stop converting to text.

Custom Advanced query Google Spreadsheet

I need to query data in a google spreadsheet and copy to another sheet to generate graphs from it. I need to query data when A (DATE in dd/mm/yyyy pattern) is between StartDate and EndDate.
This date is in another sheet and it would be nice to get this dates using query from column project
The current project can be a constant and when a new project starts this constant can be updated. to query data about current project. It is possible?
Any idea of how to do it?
I'm not exactly sure what you want the output to be but if you want to show the project number in column D of your top image then try this formula in cell D2:
=ArrayFormula(IF(LEN(A2:A),LOOKUP(A2:A,Projects!B:B,Projects!A:A),))
I set up an example sheet: https://docs.google.com/spreadsheets/d/1XJf0i9rqAswk1nrFPyTJHpvwhcTcGHuUUkTaAjOHex4/edit?usp=sharing

Resources