Power BI can connect to data entities exposed via OData from a Dynamics 365 for Operations environment. The Dynamics 365 OData endpoints by default expose all data entities that are marked as IsPublic in the AOT Properties field.
The default OData behavior is that for any entity the data return is based on the users set default company. A common requirement is to report and filter across all company data. You can expose all company data by invoking the ?cross-company=true query option.
Here is an example of the before and after effects of this filter based on my Admin user login which has USMF as the default company:
I’ll connect to the SalesOrerLines entity (NOTE: the entity name IS case sensitive) in Dynamics 365 for Operations using the following OData URL:
I only get the Sales order lines for the company USMF since that is the default company set for my user login. But what if I want to show Invoiced Sales Lines for all companies?
I can modify the OData URL and append ?cross-company=true to the end.
This will override the default behavior OData service behavior and get Sales lines for all companies. Keep in mind that this can significantly increase the volume of data being returned. In my simple demo environment, it was over 400 MB.
With the cross-company filter enabled I can now filter by specific companies or all up:
You can also override the default behavior of showing the data for the default company for the user by modifying the filter and passing in the desired company. Recall from above that my user defaults to USMF, however, here I am overriding that behavior and pulling data for USRT only.
Good Article, but I’ve been fighting trying to get this to work properly. Seems if I connect using the D365 source, and just appending the “?cross-company=true” at the end of /data (to see all tables without specifying a specific table like you are) I still only get the Default company that I am assigned to. Continuing my testing to see what else I can do….
Hello Rich,
I’ve spoken with one of our BI Solution Architects and the question they asked was if you are able to access a specific company as it is, not just the default but a different one?
Regards,
Taylor
Adding “?cross-company=true” used to work. However, with the new [Implementation=”2.0″] it no longer does. I have not yet been able to find a way to pull all or multiple legal entities when using [Implementation=”2.0″]. Which is a shame as it otherwise would help speed up queries.
Using D365FO 7.1 (about to roll up to 7.3)
Hello Alan,
We’d need to know more about your environment before we could assist you on this issue. We do offer some support options if that’s something you’d like to look into: https://stoneridgesoft.wpengine.com/support/
Regards,
Taylor