Forum Discussion
Google Analytics and Power BI: immediate error after importing (valid dimension and metric combo)
Hi everyone,
When I import data from Google Analytics, it appears there's a bug. First off, to test this, I am importing pages (dimension) and pageviews (metric), which is a valid dimension and metric combination (it's not because I haven't chosen at least one measure, as the error implies).
When I click on "Navigation" in Applied Steps, I see this error: "Expression.Error: Google Analytics requires that at least one measure be specified." This error happens no matter what I import. Something broke, and it wasn't broken before. I am not sure whether it's a problem with Power BI or the Google Analytics API. Thanks for your help!
- 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. :)
9 Replies
- AnonymousNot applicable
Anonymous,
Which dimension do you select? Do you use the latest version of Power BI Desktop(2.51.4885.581)? I can connect to Google Analytics data in the latest version of Power BI Desktop, you can review the screenshot in my scenario.
Regards,
Lydia- AnonymousNot applicable
Anonymous--this error happens even when I choose a valid metric dimension combination. No matter what I choose, I get the error if I try to go back and make edits. I have captured a video of what I'm seeing. Please note that I am not showing the GA account selection portion, because we have multiple clients whose GA accounts we manage. So prior to the video, I clicked on Get Data > Online Services > Google Analytics, and then drilled into a GA account/property/view, and that's where the video picks up. Please note this error is not GA property/view specific. It happens no matter the GA property/view I'm pulling data from.
- AnonymousNot applicable
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. :)
- AnonymousNot applicable
I am having this same problem. I successfully imported one measure and one dimension into my report. I am able to see the data. Now, when I go to Query Editor > Applied Steps > Navigation, I get this error message:
Expression.Error: Google Analytics requires that at least one measure be specified.
This error prevents me from clicking the gear icon next to Added Items (says "We cannot modify this step because there are errors in previous steps. Please resolve those errors first."), so I cannot get back to the measures & dimensions menu to select additional measures or dimensions.
This error doesn't make logical sense. I chose one measure ({Cube.AddMeasureColumn, "Sessions", "ga:sessions"}) and one dimension ({Cube.AddAndExpandDimensionColumn, "ga:date", {"ga:date"}, {"Date"}}). To state that I did not specify at least one measure is false.
It seems like Sessions and Date are very basic, and so compatibility should not be a problem.
Does anyone have insight on this problem?
-----------------------------
My Power BI Desktop version is: 2.51.4885.543 64-bit (October 2017)
- MbstrandFrequent Visitor
PERFECT solution when none of the others didn't work. Thanks!!