Forum Discussion
HOW-TO::AVOID::Error in replacing table's content with new data in a version
- 2 years ago
Your conclusion is correct. In order to stage a query it has to be treated as a table. In this case your query that results in a scalar value will be treated as a table with a single column and a single value. You could stage the numeric value as a table, and then drill down to it in another query and use it as a value for your Table.SelectRows query
Thanks miguel for confirming. There is a case# for this issue: 2403050040002140.
I also created a new Idea for some sort of GUI feedback mechanism warning users before publishing that this type of scalar returning value queries could lead to a failed refresh. I think it would be more user friendly to find out this way rather that getting the error message I quoted above. This is also with bearing in mind, that if most users learned how to use Power Query and M not by attending some well structured class, but by just opening the M function reference page and trying sh*t out, learning as you go, then there are fundamental concepts you might not keep in mind quite yet when using PQ, hence the need for more user friendly GUI feedback preempting the generation of cryptic error messages and causing users to initiate even more support tickets.
I'm the product manager working on the feature that will tell you if its something wrong before you publish (or after you publish) 😀
Hoping that such feature will come out in the next few months, but we're working on the full framework and UI components that do not feel intrussive or get in your way.