Forum Discussion
Issues with Google Analytics Data
Hi All
I am trying to pull some website stats from Google Analytics, I understand that there is a limit of the number of columns that can be pulled through, But I am only pulling "Default Channel Grouping", "Medium" and "Source" with Users and Sessions. And all sort of weirdness is happening.
Once the table has loaded I look at a specific Date in table viewer and it doesnt match what is on GA.
If i filter out that day in power query it shows the correct numbers.
Ive tried using Source/Medium instead of individual Source and Medium to no avail.
Has anyone else seen this issue? And know how to rectify?
Not sure how I can share sample data without giving away.
Part of the power query code (this works as I have filtered out one day).
{
{Cube.AddAndExpandDimensionColumn, "ga:date", {"ga:date"}, {"Date"}},
{Cube.AddAndExpandDimensionColumn, "ga:channelGrouping", {"ga:channelGrouping"}, {"Default Channel Grouping"}},
{Cube.AddAndExpandDimensionColumn, "ga:medium", {"ga:medium"}, {"Medium"}},
{Cube.AddAndExpandDimensionColumn, "ga:source", {"ga:source"}, {"Source"}},
{Cube.AddMeasureColumn, "New Users", "ga:newUsers"},
{Cube.AddMeasureColumn, "Sessions", "ga:sessions"},
{Cube.AddMeasureColumn, "Users", "ga:users"}
}),
#"Filtered Rows" = Table.SelectRows(#"Added Items", each [Date] >= #date(2020, 3, 1)),
#"Filtered Rows1" = Table.SelectRows(#"Filtered Rows", each [Date] = #date(2021, 4, 5)) //Remove this line and the numbers will change for this day
in
#"Filtered Rows1"
Thans for the help in advance
Hi Sbudd ,
There have been similar questions before, and Power BI support gave the following answers.
The TLDR solution is:
- Get your request working in the Google Analytics Query Explorer with the appropriate date range filters and make sure it says the data is not sampled.
- Apply the same date range filters via a Power Query filter step, and the data should match the query explorer.
For anyone else who runs into this problem, the issue has to do with date range filtering (or lack thereof) with the Google Analytics API.
By default, Power BI doesn't pass any date filtering parameters when it makes the API request, and that's what results in inconsistent data.
For more information, please refer to Solved: Google Analytics goal completions data inconsistency
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- v-kkf-msftCommunity Support
Hi Sbudd ,
There have been similar questions before, and Power BI support gave the following answers.
The TLDR solution is:
- Get your request working in the Google Analytics Query Explorer with the appropriate date range filters and make sure it says the data is not sampled.
- Apply the same date range filters via a Power Query filter step, and the data should match the query explorer.
For anyone else who runs into this problem, the issue has to do with date range filtering (or lack thereof) with the Google Analytics API.
By default, Power BI doesn't pass any date filtering parameters when it makes the API request, and that's what results in inconsistent data.
For more information, please refer to Solved: Google Analytics goal completions data inconsistency
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- SbuddHelper II
Firstly thank you this tool is amazing!
But what do you do if it does say the data is sampled?
- SbuddHelper II
So its literally the date range, that breaks it, 15 days worth works yet 20 doesnt , I dont really want to write 25 queries to pull a years worth of data!
I have compared 15 days and its close enough but not exact, below.
- Unicorn_TechResolver I
- Apply the same date range filters via a Power Query filter step, and the data should match the query explorer
Can you tell me where this can be done, once I click on transform data? I got the google analytics query explorer working. Thank you.
- Apply the same date range filters via a Power Query filter step, and the data should match the query explorer