Search code examples
looker-studio

How to show last available data in google data studio


I have two columns(sales and calendar day) along with many columns. I just need to show the sales of the last available calendar day in a score card.

Challenge here is I don't know what is last available calendar day. In the below example I would need 120 to be displayed in score card.

In my current setup it always displays, aggregated values which is 270

For example,

Date Sales Region City
25/07/2021 150 Australia Canberra
27/07/2021 120 Australia Canberra

can you folks please guide me on how to get value 120 in data studio without using scorecard filter

Thank you


Solution

  • A filter for a score card would not work, because the last date is not know.

    The only workaround is to use a table and order descending by date and limit the Rows per Page to one.

    enter image description here

    It would look like that, if the style of the table is adjusted:

    enter image description here

    The date column could be put to minimum width and be hidden by a rectangle with the background color. Or do not show the header of the table and add a contional formating to make the color of the text in the date column the color of the background. Another way is to remove the date column and keep the date only in the sort field.

    A more complex way is to create a blend: Please create a new blend and include your data source twice. On the left one, please only have the date column in the metrics and use as aggregation max. Then do a left join with that field and the date column of the table on the right. Please include all needed dimensions and metrics. enter image description here