cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
behnam_ab Frequent Visitor
Frequent Visitor

Set Google analytics api filters in advanced editor

Hi,

Is there any possibility to set Google analytics built-in api filters when querying data?

This is my example query steps in advanced  editor,

    let
    Source = GoogleAnalytics.Accounts(),
    #"1234567" = Source{[Id="1234567"]}[Data],
    #"UA-987654-1" = #"1234567"{[Id="UA-52004541-1"]}[Data],
    #"11111" = #"UA-987654-1"{[Id="1234567"]}[Data],
    #"Added Items" = Cube.Transform(#"11111", {{Cube.AddAndExpandDimensionColumn, "ga:pagePath", {"ga:pagePath"}, {"Page"}}, {Cube.AddMeasureColumn, "Pageviews", "ga:pageviews"}, {Cube.AddMeasureColumn, "Unique Pageviews", "ga:uniquePageviews"}}),

I want to add filters like below (regex filter which is avaiable on GA api, but not in powerbi M language formulas)

ga: pagePath=~^.*?([0-9]{6,7}|mpg[0-9]{1,3}){1}\.html[/]?[^ ]*)

Such filters are available through GA api, I just don't know how to pass them to GA through advanced editor!

 

PS: I can't use the alternative "Table.SelectRows" functionality, my filters are advanced GA api filters 

2 REPLIES 2
Brian_M
Advisor

Re: Set Google analytics api filters in advanced editor

Feedback provided by Microsoft here:

http://stackoverflow.com/questions/36373406/how-to-filter-dimension-values-when-fetching-data-from-g...

 

"

Thanks for your interest!

We don't support regular expression filters today. With Text filters you can generally implement the same filter logic, but admittedly it wouldn't be as concise as your regex.

We welcome requests for new features at https://ideas.powerbi.com, so consider starting a thread there 🙂

 

"

Brian_M
Advisor

Re: Set Google analytics api filters in advanced editor

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)