Exposing entities and associations with OData

Hi, I want to expose 4 entites in my domain model with OData and read them through Power BI. I am using the “Published Odata service” where I add the entities and mark the associations. On the Power BI desktop program I am able to connect and fetch the data trough the OData interface. Somehow the associations are lost, they are not identified in the Power BI model. What could I have done wrong and how can I test if it is correct on the Mendix side? The associations are 1-1 and 1-* and I mostly use the publish odata association setting “as a link” Kind regards Johan   EDIT* Thank you for your helpful answers. It seems to work for the 1-* associations when changing the association exposure from “as link” to “Associated Object ID ”. After that the relations has to be manually connected in Power BI. It seems like Power BI doesn’t understand my 1-1 association at this moment. It wants it to be a 1-*. It is unknown what problems that may cause but it seems to be connected at lest
3 answers

In my experience you need to recreate the associations yourself in PowerBI. The content of an association attribute is the identifier of the other entity.

Say you have users who are assigned to a project, the association is User_Project and this association is stored at in the User entity. The User_Project contains an identifier which matches the ID field of Project. You need to tell PowerBI that this is the relationship between these fields.


Are the entities available in PowerBI? Sometime you need to connect those entities by hand because PowerBI did not autodetect them. But once you connect those entities by hand it all works.





If you have Entity A and Entity B associated

  1. Expose Entity A attributes and its association
  2. Expose Entity B
  3. Based on the association in Entity A, retrieve Entity B with Power BI queries


When exposing associations only from Entity A will not expose Entity B and its attributes.

Hope this helps.