Google Sheets Query Today [duplicate] - date

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.
screenshot example
Admittedly I have very limited experience and would appreciate any help that can be given. I created a google sheet to collect forms responses. I need another tab to share daily data. I created a query to pull in the data I need, but lack the ability to filter for "today."
My current query: =QUERY('DoNotUse HISTORICAL DATA'!A:E)
My date format is: 1/15/2022 20:08:01
Nothing I have found will work without any errors. Any ideas?
Thank you.
Link to copy: https://docs.google.com/spreadsheets/d/116o_QQDWGvYkHLX2o5OdRX4X8CdhRVTQNJXYikVre94/edit?usp=sharing

Assuming that today or another date is in B1, and the form responses are in sheet called Réponses au formulaire 1
try
=query('Réponses au formulaire 1'!A:E,"select * where A>=DATE'"&TEXT(B1;"yyyy-MM-dd")&"' and A<DATE'"&TEXT(B1+1;"yyyy-MM-dd")&"' ",1)

In the "Use - Daily Query" sheet, delete everything from Columns A to E (including the headers). Also delete G1:H2.
Then place the following formula in A1:
=ArrayFormula({'DoNotUse HISTORICAL DATA'!A1:E1;FILTER('DoNotUse HISTORICAL DATA'!A2:E,INT('DoNotUse HISTORICAL DATA'!A2:A)=TODAY())})

You can probably completely change the way you look at the situation
First, compile the data
={"Date","Type","Location";QUERY(ARRAYFORMULA(split(flatten({'DoNotUse HISTORICAL DATA'!A2:A&"|"&'DoNotUse HISTORICAL DATA'!B2:E&"|"&'DoNotUse HISTORICAL DATA'!B1:E1}),"|",,false)),"select * where Col2 is not null")}
Then perform a pivot table and group dates by year/month/day

Related

Sisense continuous timeline until today(without value from data)

is there a possiblity to create continuous timeline until today, even if today has no values?
I see in documentation we can fill missing gaps, https://documentation.sisense.com/7-1/creating-dashboards/additional-widget-designs/create-continuous-chart.htm#gsc.tab=0
but if there are no values, lets say last 3 days, there is nothing showed on the graph.
I would need to see the zeros also until the last day, not only for zero values between.
Is it possible?
Thanks
Edit: The documentation you linked is for v 7.1 which is quite old. Below is a similar topic for the latest version, but make sure you're looking at documentation for a version that is at least close to what you're running. If you're really on v 7.1, upgrading would be highly recommended.
https://documentation.sisense.com/latest/managing-data/working-with-data/handlenull.htm#gsc.tab=0
This may be something to report to Sisense, it seems like the 'show null as zero' feature would do exactly what you want it to.
A workaround could be to change the nulls to 0 in the data model. Implement this as a custom column if preferred.
Another possibility: Create a date dimension table that has all the dates and left join your data to this (matching date to date).
That way you won't have any gaps in days, and have 0s for the days where there are no entries.
This article from Sisense talks about when date dimension tables are useful (the example you provided with non-consecutive data but wanting to graph consecutively) and provides and excel file you can upload to create your date dim table.
https://support.sisense.com/kb/en/article/date-dimension-file

Tableau Dimension grouping and Using two date fields?

I have two questions. First - I am trying to create a new status using Jobstatus as shown below. How do I combine "Installation_Complete" & "Unviable" into a new field name "Total Visited", How do I combine "Installation_Complete" & "Unviable" & "Need_Reschedule" into a new field name "Total Scheduled"? As well as have "Installation_Complete" as Total Installed? Example below ideally it would look like this for WK45...
Total Scheduled - 1,985
Total Visited - 1,925
Total Installed - 1,859
2nd Question - In my workbook I am primarily using two Date fields. "install_date" & "date". Installation_Complete should be referencing "install_date" while Need_reschedule & Unviable should be referencing "date". In the picture above I am using "date" in columns, so the Installation_complete is actually skewed because of the date field I am using, so how would I use both date fields?
Ex. WK45 - Installation_Complete should be referencing 'Install_date" WK45 while Need_Reschedule & Unviable should be referencing "date" WK45
It would be very helpful if anyone could help me out with their input!
Thanks,
Phillip
Since you have not given any data that can be copied, I tried recreating some sample data
This was arranged in a crosstab view like you uploaded as a screenshot
Perhaps you want this.
To this I have added a table calculation Running sum on table down and edited the aliases. For more clarification, please upload some sample data that can be copied (not as screenshot). Good Luck
PS In you screenshot the grand totals are arithmetically incorrect. Please have a look.

In Tableau, is there a way to only show the first and last date in the table output using the date filter

Tableau will generally show every single date within table output of the date ranges filtered for. Is there a way to only show the first and last date in the table for the date of ranges selected?
I created an image of the desired output in excel. Link below:
Desired output example
Thank you in advance!
The feature that will address your goal is called a Level of Detail (LOD) calculation. They have many uses and take various forms. I suggest reading about the in the online help.
But, to answer your question, the LOD calc to find the first (i.e. minimum) value in a date field called, say, Transaction Date, is;
{ MIN([Transaction Date]) }
The formula for the latest value is left as an exercise for the reader 😊

Crystal reports crosstabs column grouping

I'm trying to build a cross tab report in Crystal XI that has dates, grouped by the month as column heading, and have 2 questions I'm trying to find answers to.
1: Is there any way to display a month even if there are no records to be summarized in that month? i.e. no orders for March, but want to display Jan, Feb, Mar.? I'm pretty sure I can create a dates table and use that spoof it, but don't want to go that route as the database is part of a Vendor's package and I don't want to get to crazy in there.
2: Is there a way of specifying or limiting how many columns go across? For example in a forecast cross tab I only owant current month and the next six months to show up. I suppose I can do a date range on the selection criteria, but that seems a bit kludgy to me.
Thanks for any answers
Short answer: No.
I've seen discussions about workarounds involving creation of temporary tables, but I've never tried any such solutions myself.
I would go with the date range on the selection criteria. You could make those dates parameters for more convenient useage. If you have sevral cross-tabs that should have different date ranges you could put the crosstabs in sub-reports.

Crystal Reports - Select Current YYMM

I'm trying to create a Crystal Report that reads data from an access table. I have a particular field in the access table called REPT_YYMM. This is basically a run data field, so each month when a program is run it populates the current year/month in the field before exporting to access, so there is a way to do month to month comparisons. For the report I'm working on I just want to display the data along with the current REPT_YYMM field when the data is refreshed on a monthly basis. Is there a way to do this in a formula. I'm not familiar enough with date type functions to know where to start.
Any guidance or suggestions are appreciated!
Your question isn't very clear but if i understood correct you just need to filter the data where field REPT_YYMM = YYMM.
Goto selection formulas, record and enter:
{table.REPT_YYMM} = cStr(currentdate,'yyMM');