Forum Discussion
Many to many relationship excludes rows.
Hello community! I am running into a problem that I have unfortunately not found the solution to yet. I greatly hope that you can help me being a beginner.
Important to note is that the PowerBi report must be in Direct Query.
I want to connect two tables and add a field called the Dlv Purchase order no. These two tables are the Shipments table which contains the to be added field and the Order table which contains a large range of order-related information.
See below a snapshot of the Shipments table with the Dlv Purchase order no.
These two tables are connected by an order number (see below screenshot for the connection). These order numbers are not unique in either of the tables, however, the field Dlv Purchase order no. is unique for every order number. Thus, the relationship becomes a many to many. Also, not every order number has a Dlv Purchase order no.
In the above screenshot, the result is as I would expect and wish it to be, however, when I try to add the Dlv Purchase order field to my larger table I get a heavily reduced outcome. See below two screenshots one with the field added and one without.
Without
With
Does anyone know how I can get the Dlv Purchase order added in such a way that I see all the relevant orders and simply blank values for orders that have no Dlv Purchase order? All without losing the Direct Query connection?
I hope that I have been clear, it is my first post so please let me know if you need more detailed information.
Thank all of you for this great community that has helped me out so often already!
Greetings,
Tim
2 Replies
- lbendlin
Super User
in your table visual columns area set the "show items with no data" flag.
- AnonymousNot applicable
Thank you kindly for the response:
It is a very good tip and one that I certainly will use in the future, unfortunately, it did not work for this report.
I selected the following setting for all the fields in the report:
Unfortunately, I now get this error:
Please may you let me know if you have any idea how to solve this?
Greetings,
Tim