Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have access to Google Analytics data of a website (obtained through tagging imposed by the website's developer).
Here I have a access to several sections of the "property".
In my case I am interested in GA data from two sections: the website and the blog.
For both I need to perform the same extractions, creating the same Dimension tables and so forth...
Hence, I perform the same extractions twice, while they look the same differing only in the top lines,
which look something like this:
let
Source = GoogleAnalytics.Accounts(),
#"11223344" = Source{[Id="11223344"]}[Data],
#"UA-11223344-2" = #"11223344"{[Id=UA-11223344-2]}[Data],
#"556677889" = #"UA-11223344-2"{[Id="556677889"]}[Data],
#"Added Items" = Cube.Transform(#"556677889",
(for the website)
and
let
Source = GoogleAnalytics.Accounts(),
#"11223344" = Source{[Id="11223344"]}[Data],
#"UA-11223344-4" = #"11223344"{[Id="UA-11223344-4"]}[Data],
#"566778899" = #"UA-11223344-4"{[Id="566778899"]}[Data],
#"Added Items" = Cube.Transform(#"566778899",
(for the blog)
I thought of creating two new parameters, with two possible values each, to be chosen from a list.
Following the example above:
param1 = "UA-11223344-2" or "UA-11223344-2"
param2 = "556677889" or "566778899"
then putting a condition (using M) to pick ether one or the other value of param2 in line 5, depending on the value of param1.
However, despite correctly recognising the parameter value, Power Query returns the following error:
Expression.Error: The key didn't match any rows in the table.
Details:
Key=
Id="UA-11223344-2"
Table=[Table]
Does anybody know a way to solve this issue? Thank you
Firstly, connect to the data source and open the advanced editor, you would get codes as below:
let
Source = GoogleAnalytics.Accounts(),
#"11223344" = Source{[Id="11223344"]}[Data],
#"UA-11223344-2" = #"11223344"{[Id=UA-11223344-2]}[Data],
#"556677889" = #"UA-11223344-2"{[Id="556677889"]}[Data],
#"Added Items" = Cube.Transform(#"556677889",
Change it to the following:
let
Source = GoogleAnalytics.Accounts(),
step1 = Source{[Id="11223344"]}[Data],
step2= step1{[Id=parameter1]}[Data],
step3 = step2{[Id=parameter2]}[Data],
#"Added Items" = Cube.Transform(step3,
meanwhile, create two parameter:
parameter1, parameter2
Best Regards
Maggie
I tried this but it didn't work
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 18 | |
| 9 | |
| 9 | |
| 6 | |
| 6 |