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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

Make action to click Table step in Google Analytics connector dynamic; based on column input

In a Google Analytics query, currently the approach is to navigate to the right node, and click "[Table]":

Stevenconance_0-1666795266681.png

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:

Stevenconance_1-1666795420744.png

 

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.  

2 REPLIES 2
ReportBuilder07
Helper III
Helper III

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:

 

GA4-1.png

 

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:

 

GA4-2.png

 

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. 

 

SELECT_DESTINATION_NEW.png

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

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.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors