Default Filter that can be changed

3 views
Skip to first unread message

Christina Pagan

unread,
Sep 19, 2022, 3:16:19 PM9/19/22
to googleschoo...@googlegroups.com

Hi, trying to find functionality in google data studio where we can default to this year's data but folks can then filter by previous years. Is this possible?

Thanks!
--

CHRISTINA PAGAN

Director of Data Strategy and Insights
DEMOCRACY PREP PUBLIC SCHOOLS

C| 332.215.6995

 

    
Work Hard. Go to College. Change the World!
 

Laura Tilton

unread,
Sep 19, 2022, 3:37:03 PM9/19/22
to googleschoo...@googlegroups.com
Hi Christina, is your Year field a date field or just text?

If it's a date field, you can just default the date filter to "This Year."
If it's a non-date field, you can create a calculated field called, say, Year2 (where "Year" is your field containing the year)
IF(YEAR(TODAY())=Year,"This Year",Year)

This will essentially be the result
YearYear2
2022This Year
20212021
20202020
20192019

Then set up your drop-down filter to use the Year2 field, and default it to the value "This Year" and it will always be right :)
(Caveat: you may need to do some CASTing to get the two different year values to be comparable in your IF statement, but hopefully you get the idea.)

Laura

--
You received this message because you are subscribed to the Google Groups "Data Studio in Education" group.
To unsubscribe from this group and stop receiving emails from it, send an email to googleschool-data...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/googleschool-datastudio/CAHv6y-uoG%2BKzVLQJVYxzFNyW7amnGxvU_gYiWrv2uagDorQvsA%40mail.gmail.com.

Paczkowski, Kyle

unread,
Sep 19, 2022, 3:37:41 PM9/19/22
to googleschoo...@googlegroups.com
Create a new variable to case your YearVvariable so the Current year shows up as "Current Year" and set your default filter value to Current Year.

You'll want to do a formula so you don't need to manually update this each year. If you have some current year flag in your data that would be helpful. 

Kyle Paczkowski
Data Quality Analyst
Office of Data and Accountability | Boston Public Schools  
2300 Washington Street, Boston MA 02119

kpacz...@bostonpublicschools.org



On Mon, Sep 19, 2022 at 3:16 PM 'Christina Pagan' via Data Studio in Education <googleschoo...@googlegroups.com> wrote:
--
Reply all
Reply to author
Forward
0 new messages