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

Fields from unrelated tables

I have a problem between 3 related tables. I have 1 table with exclusive rate data, this table is related to a policy table where I have several policies for the same rate (repeated rates), and I have a rate table relating to the rate table, where in the rate table got the same rate 1 or more times.Relações.PNG

 

I need to insert columns in the "table" view of the 3 related tables but it shows me the error below.

Teste1.PNG

 

what do I do?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I haven't solved it yet, I'm modeling the data directly in SQL to help the relationship even more in the pbi, concluding, let me mark it as solved with the solution, thank you very much for the problem solving suggestions.

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

and why the table "tariffs_details" can't do this function? where this table is a dimension table.

because when you add fields which are unrelated you get the error you posted in the first post. To include unrelated fields you need measures. 
For example, let's say I have two tables. Both contain dates (so I create a dimension table for dates) and table 1 contains another field for football teams and the other contains a field for countries. There is no classification  between teams and countries. If you try to create a visual with date from the dimension  field Dates and the add the teams and countries, the model has no way of knowing which Team belongs to which country, because there is no "relationship". So it can only crossjoin the fields. The model will not intuitively associate fields. The model needs specific relationships, and you cannot create a relationship between Teams and countries because the data does not allow it.

What you can do is for example use measures to count the number of teams and countries on each date.

BTW,  I would recommended you make the relationships single direction from the dimension table to the fact tables 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

The problem that in the "Tariffs" table, I have 1 tariff 1 or several times and in it I can have 1 or more policies, is that the view I have is more of a relational database, where there would be no problem relating this data , more doubt than solution arose, shouldn't the tables talk in my case? the "tarifas_details" table I have 1 rate, exclusive values, the "tariffs" table I have 1 rate several times, and in politics I can have the same rate several times too. I have more questions now than solutions.

 

EdgarMassa__0-1634649926892.png

 

Anonymous
Not applicable

And if I use a dax aggregation function, for example the DAX max function, just to bring me the hotel ID value, would I be wrong?

Max will return the Max value. To show all values you can use CONCATENATEX 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

I haven't solved it yet, I'm modeling the data directly in SQL to help the relationship even more in the pbi, concluding, let me mark it as solved with the solution, thank you very much for the problem solving suggestions.

PaulDBrown
Community Champion
Community Champion

You need dimension tables for each field common to both tables to use in the visual. Fields which are not common require measures





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

Speaking of dimension table, and if I bring a column with unique data in the Tariff table, for example, and bring this column in common in the policy table even if they are repeated, would that solve?

You would still need a dimension table for the field. Otherwise you create ambiguity based on field selection





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

and why the table "tariffs_details" can't do this function? where this table is a dimension table.

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.