Forum Discussion
Google Analytics and Power BI: immediate error after importing (valid dimension and metric combo)
- Anonymous8 years ago
Anonymous,
I have figured out a workaround. It involes simply using the advanced editor within the query editor to manually add additional dimensions and/or metrics. Note that you need to know the API names of the dimensions and metrics, which you can browse here: https://developers.google.com/analytics/devguides/reporting/core/dimsmets
I took a video of my workaround. I simply go into the query editor, go to the Source step within Applied Steps, and then go into the advanced editor. Then I copy and paste, and simply change the names to the dimensions/metrics I want to add. The video explains it better. :)
Anonymous,
I have figured out a workaround. It involes simply using the advanced editor within the query editor to manually add additional dimensions and/or metrics. Note that you need to know the API names of the dimensions and metrics, which you can browse here: https://developers.google.com/analytics/devguides/reporting/core/dimsmets
I took a video of my workaround. I simply go into the query editor, go to the Source step within Applied Steps, and then go into the advanced editor. Then I copy and paste, and simply change the names to the dimensions/metrics I want to add. The video explains it better. :)
This doesn't solve the error so shouldn't be a solution or a workaround. I'm having the same problem and get the error message in Power BI "Expression.Error: Google Analytics requires that at least one measure be specified." on the Navigation step after adding a source with multiple values (like the original poster).
This solution (to use the advanced editor) to add additional metrics is fine if you end up with the error on the first step, but that's caused by only picking one dimension in your original query (which right now, Power BI won't even let you do and prevents you from importing the data to start with).
It's simple to reproduce and doesn't seem to be fixed.
1. Import a few columns from a GA connection (I have 6 AddAndExpandDimensionColumns and 3 AddMeasureColumns)
2. You'll have a query with three steps: Source, Navigation, and Added Items
3. Click on the Navigation step and you see this error.
The navigation code step is:
= #"UA-XXXXXXXX-X"{[Id="XXXXXXXX"]}[Data]
Where the first part is your property name in GA and the ID is your application number.
(you can see these numbers in the advanced editor when looking at the Source step)
So yes, this is still a problem and you can't fix it (at least with the steps in the video provided) and it prevents you from clicking on the gear icon in any step after the Navigation one.
I'm using Power BI desktop 2.67.5404.589