cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Paulien1989 Regular Visitor
Regular Visitor

Passing parameters for Google Analytics in the Advanced Editor

I'm trying to use parameters dynamically for a Google Analytics data set, so we can easily use this as a template and copy it to another Google Analytics account with just a few clicks.

 

I created three parameters, all types text and set to any value:

- GA Account ID

- GA Property ID

- GA Data View ID

 

The advanced editor starts with:

let
    Source = GoogleAnalytics.Accounts(),

    #"Account ID" = Source{[id= #"GA Account ID"]}[Data],
    #"Property ID" = #"Account ID"{[id= #"GA Property ID"]}[Data],
    #"Data View ID" = #"GA Property ID"{[id= #"GA Data View ID"]}[Data],


    #"Added Items" = Cube.Transform(#"Data View ID",

But it's not working, I get the following error:

 

Expression.Error: We cannot convert the value "GA PROPERTY ID" to type List.
Details:
    Value=GA PROPERTY ID
    Type=Type

(Obviously, GA PROPERTY ID above in reality has an ID value, but I hid it for integrity)

 

I found an old post delailing a solution, but I can't get that to work either: https://community.powerbi.com/t5/Desktop/Dynamic-parameter-value/td-p/226114

 

Hopefully someone can point me in the right direction!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Passing parameters for Google Analytics in the Advanced Editor

@Paulien1989 ,

 

Just change it as follows.

#"Data View ID" = #"Property ID"{[id= #"GA Data View ID"]}[Data],
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: Passing parameters for Google Analytics in the Advanced Editor

@Paulien1989 ,

 

Just change it as follows.

#"Data View ID" = #"Property ID"{[id= #"GA Data View ID"]}[Data],
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.