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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to Report across all companies using dataareaid field from Dynamics365

Hi All,

 

I have a report developed that fetches data from D365 and looks like based on the behavior, its only getting data for default company (dataareaid field). However, I am looking to report across all companies, I have been reading many threads that says adding cross-company=true makes it work but it does not work unfortunately. Basically, the dataareaid field only shows one value for which rows of info is getting pulled in. Can someone help me modify the odata feed so that I can filter on datareaid to pull in data for all dataareaid values. Thanks in advance. 

3 REPLIES 3
hasanhilmi
Frequent Visitor

I really struggled with this as well! It actually does work but you need to make sure the table is specifically called out in the URL and remove the Navigation step.

 

Check your Advanced Editor.

 

Here's an example of a working cross company table for me. 

 

let
Source = OData.Feed("https://xxx.dynamics.com/data/InventTableBiEntities?cross-company=true", null, [Implementation="2.0"]),
#"Added Custom" = Table.AddColumn(Source, "CompanyItemKey", each [dataAreaId] & "-"&[ItemId])
in
#"Added Custom"

 

Before my fixes, it looked something like this and did not work. 

 

let
Source = OData.Feed("https://xxx.dynamics.com/data/?cross-company=true", null, [Implementation="2.0"]),
InventTableBiEntities_table = Source{[Name="InventTableBiEntities",Signature="table"]}[Data],
#"Added Custom" = Table.AddColumn(Source, "CompanyItemKey", each [dataAreaId] & "-"&[ItemId])
in
#"Added Custom"

v-rzhou-msft
Community Support
Community Support

Hi @Anonymous 

Do you use Dynamic 365(online) connector to get data from D365? The default OData behavior is that for any entity the data return is based on the users set default company. 

I think you can add ?cross-company=true in the end of your Web API URL.

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

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks for your response and sharing the soluton, however the suggested soltion does not work for implementation=2.0, it used to work before but no longer does now so adding cross-company unfortunately is not  a solution. MS should add support for this asap. Do you recommend any other solution?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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