Forum Discussion
Power BI - Salesforce integration issue
Hello All!
This is my first time posting here so forgive me if I put this in the wrong section. My organization currently uses Power BI coupled with Salesforce. We were recently trying to run a report and 2 of the accounts from Salesforce were not populating in our Power BI properly. The issue is that we need to filter bu 'Billing State/Province' and this works well except for the two accounts that won't populate. When we remove the 'Billing State/Province' filter, they do show up and it displays that their 'Billing State' is empty while in Salesforce it is filled out with the correct state. Has anyone by any chance experienced a similar issue? Any help is greatly appreciated! Thanks everyone!
- Aaron
4 Replies
- AnonymousNot applicable
anfeuerstein,
Do you connect to Salesforce content pack in Power BI Service or use salesforce connector in Power BI Desktop? Could you please check if there are any difference between the 2 accounts and other accounts?
Regards,
Lydia - QueryWhizPost Patron
Hi anfeuerstein were you able to find a solution? As a workaround, maybe you can try to test your connection with a 3rd party connector. 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.
- metricaPost Prodigy
Hi anfeuerstein
I would query the two Account IDs directly using the same Salesforce user as Power BI and compare BillingState and BillingStateCode.
If the API returns the state, review the Power Query filter and transformation steps. If it returns blank, check whether Salesforce is displaying a different field or formula.
Power BI Connector for Salesforce can also help test this by filtering the Account IDs and previewing the fields before import.
AppExchange and 30-day free trial:
https://appexchange.salesforce.com/appxListingDetail?listingId=31526f0e-abd8-4cb5-bd1a-3bd56b5c0577Docs and support:
https://metricasoftware.com/docs/salesforce/
https://metricasoftware.com/docs/salesforce/contact-support/Cheers,
Metrica Team - Gautam_Kumar01Post Partisan
Hi anfeuerstein
Welcome to the community! I've seen this exact Salesforce + Power BI issue before.
This happens because of how the Salesforce connector brings in "empty" vs "null" values, and data type mismatches.
Root Cause:
When you filter by 'Billing State/Province' in PBI, those 2 accounts are getting filtered out because PBI thinks the value is `BLANK/NULL`, even though it looks filled in Salesforce.Common reasons:
1. Trailing Spaces - In Salesforce the state might be "CA " with a space. Salesforce UI hides it, but PBI sees "CA " != "CA" and also treats it differently during import
2. Different Field - In Salesforce there are 2 fields: `BillingState` and `BillingStateCode`. Sometimes integration pulls the code field which is empty, but UI shows the full name field
3. Data Refresh / Cache Issues - The dataset was refreshed before those 2 accounts were updated in SF
4. Field-Level Security - The PBI service account doesn't have read access to Billing State for those 2 specific Account recordsSolutions to try.
Solution 1: Check for spaces/nulls in Power Query
1. In Power BI Desktop > `Transform Data`
2. Select the `Billing State/Province` column
3. `Transform > Format > Trim` and `Clean`
4. Also add a custom column: `if [Billing State/Province] = null then "Unknown" else [Billing State/Province]`
5. Refresh and testSolution 2: Verify the exact field in Salesforce Connector
When you connect via "Salesforce Objects" connector, make sure you're pulling `BillingState` not `BillingStateCode`.
Sometimes `BillingStateCode` is blank but `BillingState` is filled. Check both fieldsSolution 3: Force a Full Refresh
In Power BI Service > Dataset > `Settings > Scheduled refresh` > `Refresh now` and check "Clear cache" if using Premium.
Then check if those 2 records come in correctly.Solution 4: Check in Salesforce
Run this report in Salesforce for those 2 Account IDs and check `BillingState` vs `BillingStateCode`. Also check if there are any validation rules or workflow changing the field after PBI extracts.
Quick Test:
Remove the filter, create a table visual with: `Account Name | Billing State/Province | LEN([Billing State/Province])`
If LEN shows blank for those 2, it's definitely a null/space issue.99% of the time Solution 1 fixes it. The connector is very sensitive to spaces.
Sabse important point :
`Trim()` karna mat bhoolna. Salesforce me space wale state ki wajah se ye issue sabse zyada aata hai.
Let me know which one worked for you!