Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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
without date filter (and how i need the entire base which is the source for visuals), the result is 12 and is wrong.
any suggestion how to make it to work ok?
Thanks,
Cosmin
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 windsor.ai, supemetrics and funnel.io. 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.
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?
thanks
Cosmin
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
thanks
Cosmin
Hi
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):
let
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"),
thanks,
Cosmin
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.