Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
nrawlins
Regular Visitor

Salesforce Data Source Where Clause?

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!

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@nrawlins,

 

If a fixed list does not work, then it might be not supported.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.