Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi,
I am trying to query a Salesforce Datasource using the Salesforce API in Power BI.
The issue I am having is that the Salesforce API requires the SOQL to either contain a WHERE clause on the specific query being performed, by using an explicit value "=" or a IN operator.
If I use something like the following
each ([Column] = "value")
It works, however if I try and pass a list like the following:
each List.Contains(myList, [Column])
It fails with an error because the SOQL query being executed in the background clearly does a filtering AFTER all the data has been returned (i.e being filtered in Power BI after its been retrieved and not at source) and the Web API is expecting a IN operating with a list of values.
With regards to the first query, this works because the SOQL in the background is WHERE (MyField = 'someValue')
Does anyone have any ways around this? Can Power BI pass a collection into a where clause some way?
If not, I thought about querying the records by a single value and looping through this but it will have performance issues and not the best way of doing such query!
I have also tried joining the tables on the field I need but it also looks like the joins are performed after the data is retrived and not before (using SOQL).
I cannot modify the Web API to support other queries.
Thank you!
Hi @nrawlins were you able to find a solution? As a workaround, maybe you can try to test your connection with a 3rd party connector, which pulls data directly from SF objects API and lets you pre-filter the data on the tool's UI. This means you can export filtered data to PBI based on what you need and this would improve your report's performance. I've tried windsor.ai, supermetrics 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 Salesforce connector in the data sources list:
After that, just grant access to your Salesforce account using your credentials, then on preview and destination page you will see a preview of your Salesforce fields:
There just select the fields you need. It is also compatible with custom fields and custom objects, so you'll be able to export them through windsor. Finally, just select PBI as your data destination and finally just copy and paste the url on PBI --> Get Data --> Web --> Paste the url.
If a fixed list does not work, then it might be not supported.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |