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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Paulien1989
Advocate II
Advocate II

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
v-chuncz-msft
Community Support
Community Support

@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.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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