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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Resolver I
Resolver I

Problem with Google Analytics data

Hi all, I connected GA to the desktop version of Power BI, but the data (in days, users, and channel) in BI doesn't match with GA reports. After reading a lot of post, I was filter between dates in Power Query and achieve the data match in both systems, but the problem is the maximun range of date is 2 month, I need years. Somebody knows a workaround better than this to retrieve data of the GA api? or if the Power Bi team it´s working in fix this issue?



Thanks @v-eachen-msft , By the way, I find a brief job to fix this problem, in the advanced editor you must add this code: #"samplingLevel" = HIGHER_PRECISION in each GA table,

View solution in original post

Not applicable



My data in the Power BI desktop is higher than the numbers showing on the Google Analytics site. I have checked all the filters, tried setting a new connection and also verified the data, but I cannot figure out the problem. 


Please help. 

Try to filter your table in power query by dates, at some point your data in power bi is the same than google analytics



You'd think so, but it's not.  I think the blame rests with Google, but I don't know what to do about it.

In the very first step the data is already wrong because Google tries to send all data without filters, and if there are more rows than the return limit it just truncates the rest, and the data is never correct in PowerBI.

Community Support
Community Support

Hi @andrescaso ,


You could vote for this similar idea.
You could also come up a new idea about that and add your comments there to improve Power BI and make this feature coming sooner.



Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Thanks @v-eachen-msft 


I found and vote in this post with the same problem






Thanks @v-eachen-msft , By the way, I find a brief job to fix this problem, in the advanced editor you must add this code: #"samplingLevel" = HIGHER_PRECISION in each GA table,

Thanks for posting this @andrescaso - I'm also trying to resolve some similar Google Analytics issues.


Another post had mentioned adding this:


    samplingLevel=  "LARGE",    

While yours shos to add:


    #"samplingLevel" = HIGHER_PRECISION

Which one is the proper syntax?  Do quote marks belong around the "samplingLevel" parameter name, or the value (large or higher_precision)?


Also do you know where the values are documented?  What's the difference between large and higher_precision?


Hi @CmdrKeene 

you can find the info in the support or GA, in this URL


mmm the value "LARGE" a think is not valid value

I copy for you the explanation of this parameter:


samplingLevel=DEFAULTOptional.Use this parameter to set the sampling level (i.e. the number of sessions used to calculate the result) for a reporting query. The allowed values are consistent with the web interface and include:
  • DEFAULT — Returns response with a sample size that balances speed and accuracy.
  • FASTER — Returns a fast response with a smaller sample size.
  • HIGHER_PRECISION — Returns a more accurate response using a large sample size, but this may result in the response being slower.
If not supplied, the DEFAULT sampling level will be used.See the Sampling section for details on how to calculate the percentage of sessions that were used for a query.

I so far can't seem to retrieve valid results (matching the Google Analytis website) no matter what I try.  I think I must just have too much data to query in this way.


Start simple, maybe only with users and date only, remember GA have a limit of 10.000 rows in his API

put a date filter and compare yours numbre in PBI with GA


this is my code in the advance editor for your help


Source = GoogleAnalytics.Accounts(),
#"xxxxxxxx" = Source{[Id="xxxxxxxx"]}[Data],
#"UA-xxxxxxxx-1" = #"xxxxxxxx"{[Id="UA-xxxxxxxx-1"]}[Data],
#"yyyyyyyy" = #"UA-xxxxxxxx-1"{[Id="yyyyyyyy"]}[Data],
#"samplingLevel" = HIGHER_PRECISION,
#"Added Items" = Cube.Transform(#"81471935",
{Cube.AddAndExpandDimensionColumn, "ga:date", {"ga:date"}, {"Date"}},
{Cube.AddMeasureColumn, "Users", "ga:users"}
#"Filtered Rows" = Table.SelectRows(#"Added Items", each [Date] >= #date(2017, 1, 1) and [Date] < #date(2030, 1, 1))
#"Filtered Rows"



I didn't know about that limit, but a 10,000 row return limit is definitely going to mean I can't use this for my implimentation of PowerBI directly.


I'll need to have our team gather date and store it in our own data warehouse, then have PowerBI reference that location instead.  Here's why:


My first goal was to get the daily number of sessions, broken down default channel grouping, and broken down by a custom variable dimension we have. Our Google Analytics gathers data from around 8,000 domains into one UA tracking code, and that custom variable dimension is the website ID that lets us actually see the data for a particular site.  But this means even a single day's of data is going to return nearly the limit (round 8k rows).  And I wanted to get at least a year of this data into PowerBI so I could show a trend (so let's assume around 8000 X 365 = nearly 3 million records returned.


Hi @andrescaso ,


I'm glad that you could find an idea that meets your needs. You could accept your own reply to top this idea, so that more people in need can vote more easily.



Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

Top Solution Authors