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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Post Partisan
Post Partisan

Google analytics API issue

Hi all,


i have a challenge these days with API form Google analytics (which worked fine till now)


in power query if i filter a day (12/03/2021) tha value for Goal 10 = 1 is correct, same with Google Platform

base 1.jpg


without date filter (and how i need the entire base which is the source for visuals), the result is 12 and is wrong.base 2.jpg



any suggestion how to make it to work ok?




Helper V
Helper V

Hi @cosminc Seems like an issue with your connector. As a workaround, maybe you can try to test your connection with a 3rd party tool. I've tried, supemetrics and I stayed with windsor because it is much cheaper so just to let you know other options. They have a free tier also so you can test and see if you still get that data mismatch or not. In case you wonder, to make the connection first search for the GA4 connector in the data sources list:




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




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. 



Post Partisan
Post Partisan

when i reduce the data base with filters in Query editor is ok, when is full is not ok

is it possible to be a power bi bug? if i reduce data only since 1 jan 2021 to work fine?




Hi @cosminc ,


What's your Power BI Desktop version? Please use the latest version of power Bi desktop.

And do you mind providing the M code of this table?


Best regards,
Lionel Chen

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



same problem with the new power bi version

so the cube results are changing depending on date filter which reduces the base size.

it seems to be a connector bug






i'll check the problem again after the update with the last version, but this is not ok, the solution must be fine with any versions; 


the syntax (with anonimous codes):


Source = GoogleAnalytics.Accounts(),
#"12345678" = Source{[Id="11390697"]}[Data],
#"UA-87654321-1" = #"87654321"{[Id="UA-87654321-1"]}[Data],
#"23029405" = #"UA-11390697-1"{[Id="12345678"]}[Data],
#"Added Items" = Cube.Transform(#"12345678",
{Cube.AddAndExpandDimensionColumn, "ga:date", {"ga:date"}, {"Date"}},
{Cube.AddAndExpandDimensionColumn, "ga:adContent", {"ga:adContent"}, {"Ad Content"}},
{Cube.AddAndExpandDimensionColumn, "ga:adGroup", {"ga:adGroup"}, {"Google Ads: Ad Group"}},
{Cube.AddAndExpandDimensionColumn, "ga:campaign", {"ga:campaign"}, {"Campaign"}},
{Cube.AddMeasureColumn, "Goal 10 Completions", "ga:goal10Completions"},
{Cube.AddMeasureColumn, "Goal 11 Completions", "ga:goal11Completions"},
{Cube.AddMeasureColumn, "Goal 12 Completions", "ga:goal12Completions"},
{Cube.AddMeasureColumn, "Goal 15 Completions", "ga:goal15Completions"},
{Cube.AddMeasureColumn, "Goal 16 Completions", "ga:goal16Completions"},
{Cube.AddMeasureColumn, "Goal 5 Completions", "ga:goal5Completions"},
{Cube.AddMeasureColumn, "Goal 6 Completions", "ga:goal6Completions"},
{Cube.AddMeasureColumn, "Goal 7 Completions", "ga:goal7Completions"},
{Cube.AddMeasureColumn, "Goal 8 Completions", "ga:goal8Completions"},
{Cube.AddMeasureColumn, "Goal 9 Completions", "ga:goal9Completions"}
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Added Items", {"Campaign", "Ad Content", "Google Ads: Ad Group", "Date"}, "Attribute", "Value"),




Helpful resources


Fabric certifications survey

Certification feedback opportunity for the community.


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.