Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
In a Google Analytics query, currently the approach is to navigate to the right node, and click "[Table]":
The code then generated is
#"UA-40725707-1"{[Id="72133593"]}[Data]
How can I replace the [Id="72133593"] part with a reference to the column [Id]?
I tried with the following;
#"UA-40725707-1"{[Id=[Id]]}[Data]
but this returns an error:
What's the solution for this?
I've got 11 other queries following the same pattern of clicking on "[Table]" and these queries are appended later on. That's not very efficient.
Hi @Steven-conance Just as the other answer above mentions, now that support for GA has ended you won't be able to use this option, you will have to use the beta 2.0 connector to connect GA4 data but that one still has some issues from time to time. As a workaround, maybe you can try to test your connection with a 3rd party tool. I've tried windsor.ai, supemetrics (which doesn't have PBI as a destination, so you first have to export to Google Sheets and then export to PBI) and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. 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.
Hi @Steven-conance , I think I understand what you trying to achieve and I would like to suggest another approach. However, my understanding is that this Power Query connector for Google Analytics will stop working soon when Google end support for Universal Data in July 2023. You may want to consider another option using the latest API and Data. Universal Analytics will be going away - Analytics Help (google.com)
The reason for the error message is because Power Query can no longer find the "[ID]" column. As you invoke the each call, it will lose access to the value for this row.
You should consider creating a Custom Function to invoke the API call. This is involves creating a query based on one of the Google Accounts and changing it into a function that requires ID as function parameter:
(#"Id from Table Column" as text) as table =>
let
Source = GoogleAnalytics.Accounts(),
Filter = Table.SelectRows( Source, each [Id] = #"Id from Table Column"),
Drill = Filter{0}[Data],
OtherSteps ...
in
OtherSteps
Please note there are API call limits imposed by Google. If the other steps returns too many rows then the function call will be throttled. For example, if your date range is too large or the number of dimensions returns too many rows. If this happens, you will need to use a List.Generate add pagination to the API call.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
7 | |
7 | |
6 | |
6 |