Hello @michaelreddy2019,
Thank You for posting your query onto the Forum.
Firstly, the data model itself is not designed correctly here. Below are the reasons provided as follows -
1). You’ve created a table OrderType with the metrics - “Online” and “Phone” and have assigned CustomerID’s against them and based on that column you’ve created a relationship with the Customers Table. Now, when we drag the columns such as - “Name” from Customer table, “OrderType” column from the OrderType table and “Sales Amount” from the SalesOrders table see what type of results it actually provides. Below is the screenshot provided for the reference -
If you observe the results carefully, the OrderType column is not able to bifurcate the amounts in proportion with the provided two metrics - “Online” and “Phone”. Same amounts are getting reflected for both the metrics this is because you haven’t provided that proporation/bifurcation in your Fact Table i.e. SalesOrders table. You’ve just listed CustomerID, SalesPersonName and SalesAmount in the table. Below is the screenshot provided for the reference -
So here, the first condition itself is violated. That is, you don’t have any information pertaining to the OrderType column in your SalesOrders table.
2). In continuation with the 1st point, even if you try and merge the Customer and OrderType table and convert them into one single table still you’ll face the problems. Because now, you’ll have multiple records of Customer ID’s rather than having unique ones and then you’ll not be able to create “One-to-Many” relationship between the SalesOrders table and Customer table.
So here second condition is also violated. That is, duplication of records will happen for Customer ID column when you try to merge/combine the Customer and OrderType tables.
3). The reason why you’re not being able to bring in the column (SalesPersonName) from the 3rd table (i.e. Sales Table) is because there’s no direct relationship between SalesPersonName column from the Sales Table with the Other Two Tables. The relationship is created based on CustomerID column so any information that is mapped against that column in the Customer and OrderType tables can be dragged and displayed since they’re tied against the same thread.
For example, what you’re actually trying to do is something like this, bring “Customer Name” from the Customer table and “Sales Person Name” from the Sales Person table. At the back end, this is how the results are getting evaluated. Below is the screenshot provided for the reference -
And therefore you cannot bring in the “SalesPersonName” column from the SalesOrders table into the table visual since that field/metric is altogether different and has no direct relationship with the Customer or Order Type tables.
What you can actually do here is, use the SalesPersonName as a slicer outside the table visual in order to slice and dice the results. Below is the screenshot of the results provided for the reference -
Eventhough if you want to bring in the SalesPersonName into the table visual then you’ll have to create a “Many-to-Many” relationship between the SalesOrders and Customer table which is absolutely not recommended in this type scenario.
Lastly, the answer to this question -
“How can I setup this model perfectly, so I can use filters from many side of the relationship without activating birdirectional filtering.”
It’s never recommended to use fields as a filters/slicers or as a column in any visual which directly comes from many side of the relationship. And therefore, this is the reason why we create Dimension tables in our model so that we can use the fields from those table which acts as a slicer/filter or even brought into the visualizations. Records from many side of the relationships are used for analysis in the form of “Measures”.
I recommend you to please go through the Data Modelling course which is available onto our education portal so that you can design your data model correctly since there’re several violations in the current data model. Below is the link of the course provided for the reference.
As well as I’m also attaching the working of the PBIX file for the reference purpose.
Hoping you find this useful and helps you in designing your data model.
Thanks and Warm Regards,
Harsh
sample PBI file_2 - Harsh.pbix (32.9 KB)