cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerBWhy Frequent Visitor
Frequent Visitor

SAP BW BEx Value is not a cube

This technique was taught to me by someone I unfortunately no longer have access to. I can't get it to function properly and haven't found any answers searching around.

 

I am importing data through a SAP Business Warehouse Message Server and selecting a parameter for an arbitrary set of weeks. I also have a date table which I am dynamically filtering with date fucntions to get a list of the previous 5 weeks. From that filtered table I am creating a custom text column to match the format of how the date appears in the sap parameter. I am then taking that custom column and adding it as a new query titled "List."  I am then wrapping that query formula in {} to convert it to a list. Finally, I am replacing the sap date paramenter with List{0}} but I am getting an "Expression.Error: The value is not a cube. Details:[Table]". To verify that my custom text column is functioning correctly I have copied a single value from the list and pasted it in the parameter and it works.

 

What could be causing this issue? Am I properly using the list? Sorry if there are gaps in my description. I am fairly new to using PowerBi and SAP.

 

Thank you.

6 REPLIES 6
Super User II
Super User II

Re: SAP BW BEx Value is not a cube

can you share your M code for this query (you can get it from Advanced Editor in the Edit Queries Home tab
it could be multiple things, e.g.

1) you pass a text instead of reference to cube value

2) one of the values in the list is not valid and is causing an error (although it would have to be the first entry as you use List{0})

3) wrong syntax
anyway to determine what it is I need to see the code you are using

 

also have a read here
https://community.powerbi.com/t5/Desktop/Dynamic-Parameters-with-SAP-BW-BEX/m-p/623453

https://community.powerbi.com/t5/Desktop/SAP-BW-BEx-Dynamic-Parameters/m-p/464624

Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Datanaut!

Highlighted
PowerBWhy Frequent Visitor
Frequent Visitor

Re: SAP BW BEx Value is not a cube

@Stachu  Thanks for the reply, here are my code screenshots:

This is the code as it comes ffrom BEx editor before manually making any changes

 

CreditError1.PNG

Here is the code creating the list that I am attempting to pass through the SAP parameter. Along with an image showing the formatting of the values before converting to a list:

CreditError3.PNGCreditError4.PNG

 

Finally an image when I attempt to pass the list through the SAP parameter:

CreditError2.PNG

 

Thank you.

Super User II
Super User II

Re: SAP BW BEx Value is not a cube

List{0} is giving a text - first value in the list, not the whole list

try this:

{Cube.ApplyParameter, "!V000011]",{List}}

assuming I didn't made any typos copying syntax from your screenshot it should work - for the future it's much better to post as text rather than image 

Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Datanaut!

PowerBWhy Frequent Visitor
Frequent Visitor

Re: SAP BW BEx Value is not a cube

I tried your solution and unfortunately I am getting the same error. I was under the impression that I could use List{0} and it would return the entire set of weeks as they were converted to a list in the final step of my "List" query and appears as such:

CreditError5.PNG

 

I also tried your solution without converting my query to a list and still received the same error. With the query appearing as below:

CreditError6.PNG

 
Super User II
Super User II

Re: SAP BW BEx Value is not a cube

If I understand you correctly right now you have a list named List that has one element, which is List of strings. If that's the case then List{0} will indeed return a list. So I don't think it's the syntax issue, both the codes are equivalent.

 

I think the problem is here:

Capture.PNG

I think that V000011 stands for December (or 12th period in your fiscal year assuming the index starts at 0) and for that period valid cube entries range from week 48 to 52, so your list ranging from 29 to 47 is not valid here

For earlier weeks you would need to use (I am guessing here) V000010, V000009 , etc. The easiest way to check it is to filter the cube manually for different month and see what M code gets generated

Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Datanaut!

PowerBWhy Frequent Visitor
Frequent Visitor

Re: SAP BW BEx Value is not a cube

Yes that is correct I have a list of strings within "List" and thus I was using {0}. I tested your theory by  bringing in weeks across multiple months and years and still received the same "[!V000011]". I'm assumong this just designates the week variable. Here it is below.

 {Cube.ApplyParameter, "[!V000011]", {{"[ZFISCWK3].[201816]", "[ZFISCWK3].[201817]", "[ZFISCWK3].[201818]", "[ZFISCWK3].[201819]", "[ZFISCWK3].[201939]", "[ZFISCWK3].[201940]", "[ZFISCWK3].[201941]", "[ZFISCWK3].[201942]", "[ZFISCWK3].[201943]", "[ZFISCWK3].[201944]", "[ZFISCWK3].[201945]", "[ZFISCWK3].[201946]", "[ZFISCWK3].[201947]", "[ZFISCWK3].[201948]", "[ZFISCWK3].[201949]", "[ZFISCWK3].[201950]", "[ZFISCWK3].[201951]", "[ZFISCWK3].[201952]"}}}

I also tried matching the weeks that I initially selected with the weeks that I filter for in my query and still received the error. Thanks for all your help on this. 

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors