Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I want to get data from Google Analytics for last 30 days or even a year. But my GA account has a lot of data. (For example, I have 600,000 rows for just 5 days.)
This is my query:
let
Source = GoogleAnalytics.Accounts(),
#"12345678" = Source{[Id="12345678"]}[Data],
#"UA-12345678-2" = #"12596977"{[Id="UA-12345678-2"]}[Data],
#"3456789" = #"UA-12345678-2"{[Id="3456789"]}[Data],
#"Added Items" = Cube.Transform(#"3456789",
{
{Cube.AddAndExpandDimensionColumn, "ga:city", {"ga:city"}, {"City"}},
{Cube.AddAndExpandDimensionColumn, "ga:country", {"ga:country"}, {"Country"}},
{Cube.AddAndExpandDimensionColumn, "ga:region", {"ga:region"}, {"Region"}},
{Cube.AddAndExpandDimensionColumn, "ga:pagePath", {"ga:pagePath"}, {"Page"}},
{Cube.AddAndExpandDimensionColumn, "ga:date", {"ga:date"}, {"Date"}}
{Cube.AddMeasureColumn, "Pageviews", "ga:pageviews"}
}),
#"Filtered Rows" = Table.SelectRows(#"Added Items", each[Date] >= #date(2017,8,1) and [Date] <= #date(2017,8,31))
in
#"Filtered Rows"
The query only returns 1,000,000 rows. But it should return more than that. Does it have a limitation to transfer GA data to Power BI?? I ran the query several times, sometimes, I got the data format error.
Help, please!
@Gracie,
There isn't a row limitation in Power BI Desktop. Power BI Desktop request all of the data that Google Analytics API returns, however, the underlying data Google Analytics API returns is itself sampled, you can review the blog to get more details.
You can follow the guide in this blog to break your large data range into multiple smaller date ranges and queries to avoid sampling, then connect to the data in Power BI Desktop.
Regards,
Lydia