Reputation: 487
So I'm trying to get the same data (Clicks Jan, Clicks Feb) to display as shown in the picture below. My first guess was to create a new field using the formula feature. Is there anyone that knows what the formula may look like?
The functions list: https://support.google.com/datastudio/table/6379764?hl=en&ref_topic=7570421&authuser=0
Upvotes: 0
Views: 10169
Reputation: 21
You can use this formula while creating a column to filter out dates in the last month and create a filter using this column.
CASE
WHEN "Date column name" < DATETIME_TRUNC(TODAY(), MONTH) AND "Date column name" >= DATETIME_TRUNC(DATETIME_SUB(TODAY(), INTERVAL 1 MONTH), MONTH) THEN 1
ELSE NULL
END
Upvotes: 2
Reputation: 1
Yes there is a way of doing this with Supermetrics. Watch:
Configure the data query as follows:
Connect that data source into GDS.
You are done. Table on Google Data Studio
Upvotes: 0
Reputation: 11
You can't do that in Data Studio and need to make the calculated field in sth like BigQuery. As you say you use Supermetrics plugin I searched Supermetrics for BigQuery and apparently it exists (https://supermetrics.com/blog/supermetrics-for-bigquery) or maybe there is alternative data connector that can import your market data into BigQuery. Once in BigQuery you can do very powerful analytics using SQL. There is built-in connector from BigQuery to Data Studio to visualise your final results.
Upvotes: 0