2

I want to clarify very clearly in a Data Studio report what the date range is that the report is currently running over.

So I want to add a text box up at the top of the screen to display this.
Is this possible?

From what I understand text labels can't display anything dynamically. Is it possible to do this with a function using the 'scorecard' data chart type or something similar ?

1 Answer 1

6

No, you can't make a label dynamic. However, you can make a table look like a label.

If you remove everything from a table (row numbers, title, border, colors, etc) it will look like a label with the ability to update dynamically. You can also use this trick to display dynamic images.

After this, just add any date field you already have as a metric, using functions MIN or MAX accordingly.

Example picture of dynamic labels

Step-by-step to turn a table into a dynamic label:

  1. Disable Show header
  2. Cell table color: Transparent
  3. Odd/Even row color: Transparent
  4. Disable Row numbers
  5. Disable Show pagination
  6. Background color: Transparent
  7. Border color: Transparent
  8. Chart header: Do not show

I made a public dashboard to illustrate the results:

5
  • Amazing thanks @Diego. One tiny question; in the screenshot above you have a comma in the date after the number for the day of the month. That isn't in your demo. How do I achieve that, maybe add the rd/st etc ?
    – AdamJones
    Jun 29, 2021 at 19:22
  • Actually, when I open the dashboard I see exactly what in the screenshot. Google dates follows your current locale (the one set in your Google Account). My account is using "English (United States)". So if your locale is different (other language/country), you may see different results. But if you want a formatted date, you can always create a new field and use the FORMAT_DATETIME function (see support.google.com/datastudio/answer/9730334). Jul 2, 2021 at 12:33
  • Thank you so much this is the answer that I was looking for good thing you have one here and also a follow up on the gsheet for the data source how can we make it dynamic instead of typing the date and drag and drop all the way down? Sep 22, 2021 at 10:11
  • @ErrolBoneo Your inquiry was not clear for me. Don't you prefer to formulate it better as a new question? Sep 24, 2021 at 15:47
  • 1
    What a great solution. I just want to point out that you don't even need to use a MIN and MAX formula. Just set the first table to be ordered by date ascending , and the second by date descending and then set the number of rows on both to be 1. May 22, 2022 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.