Reputation: 1620
I'm pretty new to dataStudio and I'm trying to build a simple dashboard with the billing data exported to bigQuery. The thing is that I added a bar chart to show current month expenses but it doesn't match my current bill, after a further investigation I realized the chart is including expenses from the last month as you can see in here:
The filter clearly shows the current month expenses but it still includes expenses from last month and not sure why. Also, how can I make a filter that considers invoice.month
just in case there are some expenses that started on the last day of the previous month and were charged until the next day.
UPDATE # 1:
If I add usage_start_date and usage_end_date you will see that the filter is not working as expected because it considers days from the past month
UPDATE # 2:
It seems like selecting the field for date range dimension is not available to me for my data source (bigQuery dataset created by GCP from billing data), the same thing on both options: report settings and current page settings
Upvotes: 1
Views: 6137
Reputation: 282
This is probably because the data source in question has enforced the date range to the partitioned column.
So, you can check this by editing the data source -> Edit connection, and check if the
Use xxx as date range dimension
setting is on.
Upvotes: 1
Reputation: 6482
The invoice.month
field is currently not a Google Data Studio recognised Date; creating the Data Source-level Calculated Field below will do the trick:
One approach is to use a complete YYYYMMDD Date, which can be achieved by using the CONCAT
function to add a Day component (the 15th is used below), and then incorporating the TODATE
function to ensure that the Date format is recognised:
TODATE(CONCAT(invoice.month, "15"), "%Y%m%d", "%Y%m%d")
Google Data Studio Report and a GIF to elaborate:
Ensure that the Date Range Dimension in the chart as well as the the Report (or Current Page) is set to a Google Data Studio recognised Date Field; this can be achieved by:
2.1) Report Settings
2.2) Data Source
2.3) Date Range Dimension
Added a New Page to the Report as well as a GIF to demonstrate:
Upvotes: 5