Google Data Studio - Is it possible to display comparison metric in scorecard by auto date range as default date range - comparison

I have created a drop down list with Months in a year and I have grouped this Month drop down to a score card. I have set the default date range to Auto Date Range, so the score card should display the metric of the month which I will select in the drop down. It is working fine till here.
However, the comparison metric is showing up as 0 when I'm selecting Comparison Date Range to Previous Period. We have data for previous month as well.
Can some one let me know what would be the issue and if it is possible to display comparison metric in scorecard by auto date range.
Attaching snapshots for clear understanding of the issue. I would be glad if we can have a fix for this.
Drop-down list:
Configuration of Scorecard:
Scorecard after filtering it to current month from drop down:

Related

Adjusting Tableau Date Values to per month

I'm looking to adjust the basic Tableau time frame from the ISO/Gregorian format to a customized one. Currently, I'm displaying data in a line chart by Month and week. The week format is based on 52 weeks ie 'Week 43' = 10/17-10/23. I would like to display the week time line relative to its given month ie the column would read October 'Week 1' = 10/01 - 10/07, 'Week 2' = 10/08-10/14 and the following month would reset the weeks to start at zero. Is this achieved by a parameter?
There are a few features in Tableau that will help you with this.
Read through the on-line help about creating custom dates, setting fiscal years for date fields. The custom date feature is based on the Tableau function DATE_TRUNC() so you might want to read about that as well.
The short answer though is - right click on your date field in the data pane on the left margin, then set the fiscal year start under the default properties and create a custom date at the week level. You want to create a date value, not a date part.
Then use your custom date to build your viz, and change it between discrete and continuous depending on how you want to present your values.

Linking a fixed spreadsheet and a moving spreadsheet by cell value

I work for a small business that depends quite a lot on the weather. I’m trying to create a spreadsheet (in google sheets) to predict daily revenue. At the moment the spreadsheet simply multiplies last year’s corresponding day by the growth percentage to get this year’s daily values. I’m trying to include the weather forecast (15 days) in the calculation. I’ve managed to import the forecast successfully using an api tutorial that I found online (https://www.visualcrossing.com/weather-data), and include the forecast values in the revenue calculation.
Now for the issue:
*the revenue prediction is a spreadsheet with every row being a day of the year, making the spreadsheet 365 rows long
*the imported forecast (in another tab, not sure that’s relevant) is only 15 rows long and updates every day, meaning that it remains that length. No new row is added during the update: the data just shift one row up and the first day disappears while a new day takes the bottom row.
My formula in the revenue tab identifies the weather data in the weather tab by row but when I pull the formula down for the whole year (down 365 rows, that is), only the first 15 rows refer to existing data in the weather tab. -> Not only are the results obtained based on the wrong row as soon as the weather tab updates on day 2, but they are also referring to totally empty cells from day 16 on.
So my questions are:
*is there a way to force the daily weather forecast to remain on its row and add a new row every day, or failing that,
*is there a way for the formula to recognize the matching day cells and use the value of the cell x columns to the right of it, effectively skipping the row referencing altogether
I’ve added a very simplified sketch of the spreadsheets for the more visual helpers out here
Apologies if this is unclear, I do not have a tech background but am happy to clarify anything if needed.
-- Edit: Here is a screenshot of the revenue tab. The expected output is in column K. The values in it at the moment are incorrect.
Seems like you just need a dynamic way to match the dates? I can't tell if you meant to have prior year data in other tab, but this spreadsheet matches your example and returns the value irrespective of the row order.
The formula being used (in the top row) is:
=B1*index(WeatherTab!B:B,match(A1,WeatherTab!A:A,))*index(WeatherTab!C:C,match(A1,WeatherTab!A:A,))

Google Sheets Array Formula for Time Series

I'm working on a google sheet that generates a monthly time series based on the following information:
Start Date (C17)
End Date (C18)
Amount at the beginning of the period (C19)
Deductions during the period (D19:L19)
My current setup looks like this:
I need two ArrayFormulas:
One to populate the column's deducted amount (D19:L19) if the date (B21:B) is within the deduction date range (D17:17, D18:18)
One to calculate the effective post-deduction amount at the end of each month.
I am using ArrayFormulas because I expect regular users to have a hard time auto-populating normal formulas after pasting particularly long rows of deduction details.
The time series table is intended to be generated by feeding data from another table - one that has the monthly starting amount and deduction details using the fields of Start Date, End Date and Amount. So far, I've been able to put together are the following:
Months in Range:
=datedif($C$17,$C$18,"M") - named range "ScheduleMonths"
Column of Months:
=ArrayFormula(edate(C17,row(B1:indirect("B"&ScheduleMonths))))
Monthly Total Remaining:
=ARRAYFORMULA(C21:indirect("C"&ScheduleMonths+20)-
D21:indirect("D"&ScheduleMonths+20)-E21:indirect("E"&ScheduleMonths+20)-
F21:indirect("F"&ScheduleMonths+20)-G21:indirect("G"&ScheduleMonths+20)-
H21:indirect("H"&ScheduleMonths+20)-I21:indirect("I"&ScheduleMonths+20)-
J21:indirect("J"&ScheduleMonths+20)-K21:indirect("K"&ScheduleMonths+20)-
L21:indirect("L"&ScheduleMonths+20))
This is the normal formula I set up for use in the table fields:
=if(AND(C$17<=$B21,$B21<=C$18),C$19,"")
I expect the resulting ArrayFormulas to populate all monthly deduction cells with the proper deduction amounts should the date (B21:B) fall within the deduction date range (D17:17, D18:18). So far, I have only achieved this with normal formula.
Update: I figured out how to do the post-deduction amount in A22.
=ARRAYFORMULA(C22:indirect("C"&'Amplaine Auto Time Series'!ScheduleMonths+21)-SUMIF(IF(COLUMN(D22:indirect("AC"&'Amplaine Auto Time Series'!ScheduleMonths+21)),ROW(D22:indirect("AC"&'Amplaine Auto Time Series'!ScheduleMonths+21))),ROW(D22:indirect("AC"&'Amplaine Auto Time Series'!ScheduleMonths+21)),D22:indirect("AC"&'Amplaine Auto Time Series'!ScheduleMonths+21)))
The population of individual deduction fields is still a work in progress with growing requirements.

Can Google Data Studio do time-series graphs at the hour level?

Every example of a time-series graph I've seen for Google Data Studio has a metric plotted per day. Is there any way to configure the granularity of the time axis (hour, month, etc)?
I want to show the count of events per hour throughout one day.
My columns are in bigquery as types datetime:TIMESTAMP and count:INTEGER
This is old, but its high in search results, and I found the correct answer here: https://www.en.advertisercommunity.com/t5/Data-Studio/Is-it-possible-to-aggregate-by-hour/td-p/1104815
Click the pencil next to the datasource, on your timestamp, click on the type column, and change "Date(YYYYMMDD" to another format, such as DATE HOUR("YYYYMMDDHH") to get hourly aggregation on the graphs.
Now, there seems to be a straightforward way:
Assuming that you have a Time Series plot, use Timestamp for your dimension and want to show hourly aggregated values.
Select the dimension's preferences:
Change Type to Date Hour
Edit: Based on new updates to Data Studio, #Brian's answer above is the correct one.
You can create a calculated field with the TODATE funciton. Example formula can be TODATE(source_field, 'SECONDS', '%Y%m%d%H'). Then this field should be marked as Date(YYYYMMDDHH) in the field editing screen.
There is a way to do this. If the data is broken up hour by hour, make the hour column(s) the Time Dimension. If all of the hour data isn't in a single column, you may want to reformat your data (manually or using a data prep source, your choice). Or you can go into the time setting of the field and change it into hours.

Add numbers in Column B based and on Day of the Week in Column A and display highest/lowest resulting Day

I have a sheet that lists every day of the year and is updated on a daily basis. Next to each day is a percentage. I would like to display the day of the week that has the highest (and lowest) percentage when adding all relative days throughout the year. (i.e.: all Thursdays)
I am using this formula, which only partially works. It displays the day of the week, but seems to only reference the latest occurrence instead of all in Column A.
B2:
=iferror(INDEX($A4:$A,MATCH(MAX(B4:B),B4:B,0)),"")
B3:
=iferror(INDEX($A4:$A,MATCH(MIN(B4:B),B4:B,0)),"")
Link to a sample book: https://docs.google.com/spreadsheets/d/1_LP5MmmgW3i0zM6ziud9YrWfH5SvuHFbZH3OmRj9W6E/edit#gid=0
I hope this is enough information to understand what I am hoping to accomplish.. Is this possible in Google Sheets?
If I can get this to work my second goal would be to show the highest/lowest for the current month (or a specific month) in addition to the whole year.
Thanks!
Take a look at the shared spreadsheet and see if it does what you want.
https://docs.google.com/spreadsheets/d/1LL4Mgn_IWa-8W6Q0TythdMhBieVFt8ZiKI_UeO9ciTI/edit?usp=sharing
Added col L,O,R,and U for numeric day of week, current month,
current year, and month number. You can hide these columns.
I added some data for testing.

Resources