Dynamics 365 for Operations: Access All Company Entity Data from Power BI

By Josh Lee | May 9, 2017

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.

Dynamics 365 for Operations Accessing All Company Entity Data from Power BI

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:

Dynamics 365 for Operations accessing all company entity data from Power BI

I’ll connect to the SalesOrerLines entity (NOTE: the entity name IS case sensitive)  in Dynamics 365 for Operations using the following OData URL:

Dynamics 365 for Operations accessing all company entity data from Power BI

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?

D365forOperations_EntityData_JoshLee4

I can modify the OData URL and append ?cross-company=true to the end.

D365forOperations_EntityData_JoshLee5

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.

D365forOperations_EntityData_JoshLee6

With the cross-company filter enabled I can now filter by specific companies or all up:

D365forOperations_EntityData_JoshLee7

D365forOperations_EntityData_JoshLee8

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.

D365forOperations_EntityData_JoshLee9

D365forOperations_EntityData_JoshLee10


Under the terms of this license, you are authorized to share and redistribute the content across various mediums, subject to adherence to the specified conditions: you must provide proper attribution to Stoneridge as the original creator in a manner that does not imply their endorsement of your use, the material is to be utilized solely for non-commercial purposes, and alterations, modifications, or derivative works based on the original material are strictly prohibited.

Responsibility rests with the licensee to ensure that their use of the material does not violate any other rights.

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!