Forum Discussion
google analytics
- 9 years ago
Hi carlydugger,
The connector in Power BI Desktop rely on the Google Analytics Core Reporting API. Although we attempt to release updates in accordance with any changes, the API may change in a way that affects the results of the queries we generate. Due to this dependency we cannot guarantee the results of your queries when using this connector.
In your scenario, please try to update the Power BI Desktop to the latest version 2.39.4526.362 and connect to Google Analytics. If issue persists, according to this article, this should be a better place for you mainly discussing questions related to google-analytics-api.
In addition, we are not able to place a date hierarchy in Visual /Page /Report level filter currently. To work around the issue, you can use the custom visual HierarchySlicer.
Best Regards,
Qiuyun Yu
I ran into the same problems.
Connecting to the GA API via Power BI gave me wrong numbers while using the GA API via SEO Tools for Excel was ok.
This may be linked to the amount of data imported.
I have tried to modify the query using the advanced editor.
I added a line with samplingLevel= "LARGE", as indicated in the documentation
let
Source = GoogleAnalytics.Accounts(),
Account = Source{[Id=#"GA Account Id"]}[Data],
Property = Account{[Id=#"GA Property Id"]}[Data],
View = Property{[Id=#"GA View Id"]}[Data],
samplingLevel= "LARGE",
#"Éléments ajoutés" = Cube.Transform(View, {{Cube.AddAndExpandDimensionColumn, "ga:yearMonth", {"ga:yearMonth"}, {"Month of Year"}}, {Cube.AddAndExpandDimensionColumn, "ga:medium", {"ga:medium"}, {"Medium"}}, {Cube.AddMeasureColumn, "Sessions", "ga:sessions"}})
in
#"Éléments ajoutés"It does not return errors, but seems to solve the issues as the figures are the same as in GA.
However, another solution would be to trim the imported data to a selection of dates.
With the GA API, you have to set a start and end date
In Power BI, you always seem to import everything.
I have tried to add dateranges to my query as per this guide
dateRanges= {[startDate="2014-11-01", endDate="2014-11-30"]},It does not throw any error, but the date ranges are not applied either.
If this is possible, what is the right syntax?