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
Coriel-11
Resolver I
Resolver I

Expression.Error: The value is not a cube.

I'm getting this error message for a query that's pulling from Google Analytics. In desktop it works fine, but when I publish it online and then leave it to get a scheduled refresh, it fails and gives me the error message:

 

 

 

 

There was an error when processing the data in the dataset.Hide details
Data source error:	Expression.Error: The value is not a cube.. <ccon>#table({"Year", "Month of the year", "Unique Pageviews", "Page"}, {}). </ccon>;The value is not a cube.. The exception was raised by the IDbCommand interface. Table: BR Renewals.

 

 

 

 

It's confusing because I've used similar extraction of the four fields I use here elsewhere without problems, but here is (what I think is) the offending M code.

 

 

 

 

let
    Source = GoogleAnalytics.Accounts(),
    #"xxxxxxxx" = Source{[Id="xxxxxxxx"]}[Data],
    #"UA-xxxxxxxx-2" = #"xxxxxxxx"{[Id="UA-xxxxxxxx-2"]}[Data],
    #"xxxxxxxx" = #"UA-xxxxxxxx-2"{[Id="xxxxxxxx"]}[Data],
    #"Added Items" = Cube.Transform(#"xxxxxxxx",
        {
            {Cube.AddAndExpandDimensionColumn, "ga:year", {"ga:year"}, {"Year"}},
            {Cube.AddAndExpandDimensionColumn, "ga:month", {"ga:month"}, {"Month of the year"}},
            {Cube.AddMeasureColumn, "Unique Pageviews", "ga:uniquePageviews"}
        }),
    #"Filtered Rows" = Table.SelectRows(#"Added Items", each ([Year] = "2022" or [Year] = "2023" or [Year] = "2024")),
    #"Added items to cube" = Cube.Transform(#"Filtered Rows",
        {
            {Cube.AddAndExpandDimensionColumn, "ga:pagePath", {"ga:pagePath"}, {"Page"}}
//           {Cube.AddAndExpandDimensionColumn, "ga:sourceMedium", {"ga:sourceMedium"}, {"Source/Medium"}}
        })
in
    #"Added items to cube"

 

 

 

 

I then take this query and have another query which reference it which is still part of the cube, but this is (again) something that works elsewhere in the same file (and has done for a long time). I though it might be because I had two referencing queries drawing off the intial one, but when I gave each its own initial file, the problem persists.

Anyone got any insight on this one. There are very few cube error entries in the forum, and I'm very far froman expert on them.

Thanks

Matt

4 REPLIES 4
QueryWhiz
Helper V
Helper V

Hi @Coriel-11 I know this reply is very late lol but were you able to find a solution? I used the GA native connector but had some issues with my data sometimes. Maybe you can try to test your connection with a 3rd party connector. I've tried windsor.ai, supemetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options. In case you wonder, to make the connection first search for the GA connector in the data sources list:

 

GA-1.png

 

After that, just grant access to your GA account using your credentials, then on preview and destination page you will see a preview of your GA fields:

 

GA-2.png

 

There just select the fields you need. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url.

 

SELECT_DESTINATION_NEW.png

Hi @QueryWhiz,
Thanks for getting back to me. I know it's a while ago, but I came across this problem again more recently and (forgetting I had already raised it here) searched again and was surprised when it popped back up.
Unfortunately I've been moved onto other projects for the time being (with this still unsolved) so it might be a while until I can get back to it, but I'll give what you suggest a whirl and see if it helps,
Many thanks for your help,

Matt

AnkitKukreja
Super User
Super User

Hi @Coriel-11 

 

This was previously answered. Please see if this helps

 

https://community.powerbi.com/t5/Power-Query/Google-Analytics-and-Power-BI-immediate-error-after-imp...

 

 

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Hi @AnkitKukreja 

 

Thank you very much for your post, but I don't see how these are at all the same (other than they both related to Google Analytics).


It's a totally different error message and the solution (using the Advanced editor to add extra fields etc) is something I had already been doing for a long time. Apologies if I'm misunderstanding. Please let me know if so.

 

I do appreciate the effort you went to in order to find the potential solution, but unfortuantely it's not the right one on this occasion.
Thanks

Matt

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.

Top Solution Authors
Top Kudoed Authors