Forum Discussion

Bee's avatar
Bee
New Member
6 years ago
Solved

Google Analytics - Expression Error

I have 2 custom dimensions which I am trying to load the data into Power BI using the online services - Google Analytics. I checked on custom dimensions and encountered "Expression.Error: Google Analytics requires that at least one measure be specified". Please help to resolve issue

4 Replies

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi , Bee 

    Do you use at least one  valid dimension and measure combination?

    Here  we need  at least one valid measure to display the data.

    For more detail ,you can refer to the video on the third party website.

    Url: https://www.youtube.com/watch?v=FW4s43dmisc

     

    In addition ,you can also refer to the following related posts.

    Url: https://community.powerbi.com/t5/Power-Query/Google-Analytics-Expression-Error-on-PBI-Desktop/td-p/104617

    https://community.powerbi.com/t5/Power-Query/Google-Analytics-and-Power-BI-immediate-error-after-importing/m-p/645546

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello,

       

      I was having a similar problem and found this answer, but in my case this didn't fix the issue. I already had valid dimensions and metrics in the query, but I was still getting the error at the "Navigation" step of the query, before the part of the query where dimensions or metrics are added at all.

       

      I have an alternative fix if you are having the same problem I was, which I thought I would post here in case it helps anyone else. It seems the problem was being causing the navigation step because PowerBI doesn't seem to accept the multiple variable assignments to drill down from GA account->property->view

       

      If you open the Advanced Editor, you should see something like this (I have changed the actual account, property and view numbers of my GA to XXXs, YYYs and ZZZs):

       

      https://i.imgur.com/7gePwJK.png 

       

      My fix was to change the code here so that instead of having these three different variables in different steps, the entire navigation down the three different levels of ID was done in the "Cube.Transform" step. So your final version should look like this:

       

      https://i.imgur.com/n4xgO5R.png 

       

      This seems to resolves the issue.

       

      Sorry those images are links and not embedded - this forum didn't seem to like me embedding the images in the post.

       

      • elettra84's avatar
        elettra84
        New Member

        This last post solved my issue too!!! grwat stuff thanks for this.