Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I'm using the Google Analytics (GA) connector in Power BI desktop. I want to filter my queries using custom segments. I've created these segments in GA but I can't work out how to add them to my query.
They don't appear in the 'Add Items' menu but they are documented in the Googla Analytics Core Reporting API (which I presume Power Query is using) https://developers.google.com/analytics/devguides/reporting/core/v3/segments
Solved! Go to Solution.
It doesn't appear possible to use Segments with the off the shelf GA connector. Using Web.Contents() to query the Core Reporting API doesn't work either as GA requires OAuth2 authentication and the PQ doesn't support that.
I solved the problem by writing a Python script, however I', told the new Data Connector SDK allows OAuth2 authentication (https://powerbi.microsoft.com/en-us/blog/data-connectors-developer-preview/) so that might be worth a try
You can vote for custom segments to be added to the Google Analytics data connector here
@Anonymous @edwardrmiles @v-chuncz-msft
Another - more stabil - solution is to get access to the unaggregated Google Analytics data.
This is possible using the scitylana.com services.
It doesn't appear possible to use Segments with the off the shelf GA connector. Using Web.Contents() to query the Core Reporting API doesn't work either as GA requires OAuth2 authentication and the PQ doesn't support that.
I solved the problem by writing a Python script, however I', told the new Data Connector SDK allows OAuth2 authentication (https://powerbi.microsoft.com/en-us/blog/data-connectors-developer-preview/) so that might be worth a try
Hi Edward,
Could you please share your Python script you used for getting GA Segments ?
Thank you for your help.
Nicolas.
Hi Edward,
Could you please share your Python script you used for getting GA Segments ?
Thank you for your help.
Nicolas.
I'm not familiar with it, but you may do research into the Advanced Editor.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 45 | |
| 38 | |
| 34 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 65 | |
| 63 | |
| 31 | |
| 26 | |
| 25 |