Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hi,
I am trying to get some Google Analytics data into PowerBI, however I need to filter it for a specific segment. I was searching the web for an answer, but could not find anything relevant.
In essence, I need to filter everything for this: sessions::condition::ga:orderCode==XX11XX2X [or gaid:xxxxxxxxxxxxxxxxx] (taken from G.A. query explorer)
Query below if it helps:
let Multiple =(id1 as text,id2 as text,id3 as text)=>
let
Source = GoogleAnalytics.Accounts(),
#"11111111" = Source{[Id=id1]}[Data],
#"XX-11111111-1" = #"11111111"{[Id=id2]}[Data],
#"11111111" = #"XX-11111111-1"{[Id=id3]}[Data],
#"Added Items" = Cube.Transform(#"11111111",
{
{Cube.AddAndExpandDimensionColumn, "ga:yearMonth", {"ga:yearMonth"}, {"yyyymm"}},
{Cube.AddMeasureColumn, "Sessions", "ga:sessions"},
{Cube.AddMeasureColumn, "Bounces", "ga:bounces"},
{Cube.AddMeasureColumn, "Transactions", "ga:transactions"},
{Cube.AddMeasureColumn, "BounceRate", "ga:bounceRate"}
}),
#"Filtered Rows" = Table.SelectRows(#"Added Items", each [yyyymm] >= 201701)
in
#"Added Items"
in Multiple
Any help will be appreciated.
Thx !
Hi sailor321,
Both GA connector and Web.Contents() don't support custom segment in power query currently because post request in Web.Contents() function doesn't support OAuth2. In addtion, it's still a requested feature, please refer to this idea. As a workaround, you may use python or R script to achieve the filtered data from GA and then import the data into power bi.
Regards,
Jimmy Tao
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 65 | |
| 45 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 115 | |
| 114 | |
| 38 | |
| 36 | |
| 26 |