Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ElmarHilber
New Member

Google Analytics Data grouped or sampled?

I have one and the same power . pbix-file and load events from google analytics and found deviations. I load about 1.000.000 events for a period of 7 years each night. To be complete and maybe this influences the data. I loaded this data some times today. 

 

Originaly I have the following query in which I am missing some events that I find with https://ga-dev-tools.web.app/query-explorer/. 

let
Source = GoogleAnalytics.Accounts(),
#"xxxxxx" = Source{[Id="xxxxxx"]}[Data],
#"UA-xxxxxx" = #"1798166"{[Id="UA-xxxxxx"]}[Data],
#"xxxxxx" = #"UA-1798166-3"{[Id="xxxxxx"]}[Data],
#"Added Items" = Cube.Transform(#"xxxxxx",
{
{Cube.AddAndExpandDimensionColumn, "ga:eventAction", {"ga:eventAction"}, {"Event Action"}},
{Cube.AddAndExpandDimensionColumn, "ga:eventCategory", {"ga:eventCategory"}, {"Event Category"}},
{Cube.AddAndExpandDimensionColumn, "ga:eventLabel", {"ga:eventLabel"}, {"Event Label"}},
{Cube.AddAndExpandDimensionColumn, "ga:date", {"ga:date"}, {"Date"}},
{Cube.AddMeasureColumn, "Total Events", "ga:totalEvents"},
{Cube.AddMeasureColumn, "Unique Events", "ga:uniqueEvents"}
}),
#"Filtered Rows (Date)" = Table.SelectRows(#"Added Items", each [Date] > AnalyticsMinDate),
#"Removed Errors - Date" = Table.RemoveRowsWithErrors(#"Filtered Rows (Date)", {"Date"}),
#"Filtered Rows (Label,Category)" = Table.SelectRows(#"Removed Errors - Date", each Text.Contains([Event Category], "xxx") or Text.Contains([Event Category], "xxx") or Text.Contains([Event Category], "xxx") and [Event Label] <> "xxx" and not Text.StartsWith([Event Label], "xxx")),
#"Split Column by Delimiter" = Table.SplitColumn(#"Filtered Rows (Label,Category)", "Event Label", Splitter.SplitTextByEachDelimiter({"-"}, QuoteStyle.Csv, false), {"Event Label.1", "Event Label.2"}),
#"Filtered Rows (NoCompanyId)" = Table.SelectRows(#"Split Column by Delimiter", each [Event Label.1] <> "(not set)"),
#"Changed Type" = Table.TransformColumnTypes(#"Filtered Rows (NoCompanyId)",{{"Event Label.1", Int64.Type}, {"Event Label.2", type text}}),
#"Removed Errors - Labels" = Table.RemoveRowsWithErrors(#"Changed Type"),
#"Renamed Columns" = Table.RenameColumns(#"Removed Errors - Labels",{{"Event Label.1", "Event Label.CompanyId"}, {"Event Label.2", "Event Label.CompanyName"}}),
#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Event Label.CompanyId] = xxxxxx)
in
#"Filtered Rows"

 

The result is grouped by days and I have only a few events per day but missing some events.BI Query withmany filters and NOT grouped.png

 

Searching for the missing events i created in the same pbix-file a new similar table but with viewer filters to get the raw data to check where I lose some events. 

 

let
Source = GoogleAnalytics.Accounts(),
#"xxxxxx" = Source{[Id="xxxxxx"]}[Data],
#"UA-xxxxxx" = #"xxxxxx"{[Id="UA-xxxxxx"]}[Data],
#"xxxxxx" = #"UA-1798166-3"{[Id="xxxxxx"]}[Data],
#"Added Items" = Cube.Transform(#"xxxxxx",
{
{Cube.AddAndExpandDimensionColumn, "ga:eventAction", {"ga:eventAction"}, {"Event Action"}},
{Cube.AddAndExpandDimensionColumn, "ga:eventCategory", {"ga:eventCategory"}, {"Event Category"}},
{Cube.AddAndExpandDimensionColumn, "ga:eventLabel", {"ga:eventLabel"}, {"Event Label"}},
{Cube.AddAndExpandDimensionColumn, "ga:date", {"ga:date"}, {"Date"}},
{Cube.AddMeasureColumn, "Total Events", "ga:totalEvents"},
{Cube.AddMeasureColumn, "Unique Events", "ga:uniqueEvents"}
}),
#"Filtered Rows" = Table.SelectRows(#"Added Items", each Text.Contains([Event Label], "123456")),
#"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"Date", Order.Descending}})
in
#"Sorted Rows"

 

But now the Events are grouped or summed or sampled with by far more events for some few days. Many days are missing as they are pobably grouped by the shwon days. 

BI Query without filters and grouped.png

I repeated this many times to excluede errors. Some idea how i get all data and not sampled or groupe over some days?

 

 

2 REPLIES 2
QueryWhiz
Helper V
Helper V

Hi @ElmarHilber  Were you able to find a solution? As a workaround, maybe you can try to test your connection with a 3rd party connector, which also uses the GA API to pull the data but I've never had any quota limits issue. I've tried windsor.ai, supemetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the GA connector in the data sources list:

 

GA-1.png

 

After that, just grant access to your GA account using your credentials, then on preview and destination page you will see a preview of your GA fields:

 

GA-2.png

 

There just select the fields you need. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url.

 

SELECT_DESTINATION_NEW.png

v-stephen-msft
Community Support
Community Support

Hi @ElmarHilber ,

 

Check this similar post:  Solved: Google analytics not importing all data - Microsoft Power BI Community

 

And there's a limitation.

Google Analytics quota limits for Power BI

The standard limitations and quotas for Google Analytics AP requests is documented in Limits and Quotas on API Requests. However, Power BI Desktop and Power BI service allow you to use the following enhanced number of queries.

  • Queries per day: 1,500,000
  • Queries per 100 seconds: 4,000

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.