Forum Discussion
How to use query against Salesforce Object
- 6 years ago
Hi Anonymous ,
Using the built-in salesforce connector, it is only possible to query data after importing the whole table in Power BI Desktop. There is a similar idea about adding salesforce query in Power BI , please vote it up.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi All - I have encountered this issue for several years due to our usage of several extensive managed packages that push the query over the PowerBI URI character length. The MS Documentation Known Issues & Limitation does a good job describing the problem, but as noted not so great providing detail on how to use the Select Query Advanced Option. Fortunately it's not hard at all using Advanced Editor if you can find the right syntax. Below is an example of a boilerplate query of the Account object (per Power Query Editor Advanced Editor) which against my org returns the dreaded URI length error:
As you can see it is attempting to pull the entire Account object inclusive of all fields before getting to the ability to limit the selected fields. To get around this just reference the Advanced Editor syntax for a smaller object where you CAN get to the Select Columns interface, then copy/paste that code into your Account query editor and tweek the details as needed to make it fit. Example shown below, it's not exactly a SOQL query syntax but you get the pattern, just string together the API names of all the fields you want to pull down and you're good to go!