1

I have 2 tables, say Table1 (with primary key Table1_PK) and Table2 (with foreign key Table2_FK referencing the primary key Table1_PK) such that:

select count(*)
from Table1 t1

is greater than

select count(*)
from Table2 t2

and

select count(*)
from Table1 t1
left join Table2 t2 on t2.Table2_FK = t1.Table1_PK

greater than

select count(*)
from Table1 t1

and

select count(*)
from Table2 t2
left join Table1 t1 on t1.Table1_PK = t2.Table2_FK

is equal to

select count(*)
from Table2 t2

So, I deduce that there is a One-To-Many relationship from Table1 to Table2.

But SSAS Tabular says that there is a Many-to-Many relationship between Table1 and Table2 with respect to corresponding keys.

Where am I missing something in the way of checking for many-to-many relationship between 2 tables?

Dale K
  • 25,246
  • 15
  • 42
  • 71
MCrassus
  • 149
  • 1
  • 6
  • What version of SSAS and SSDT? – David Browne - Microsoft Dec 17 '19 at 01:27
  • Are you using a composite model? If so, it shows them all as many to many regardless. – Greg Low Dec 17 '19 at 03:28
  • I don't know if I can use a composite model in SSAS Tabular like it is in PowerBI, I think no because in SSAS Tabular, my model has an option set globally to DirectQuery Mode = Off. When I try to link the tables, the message says that many-to-many relationships are not allowed. So, I don't understand why it detects the relationship as a many-to-many one, giving the above check. – MCrassus Dec 17 '19 at 07:46
  • SSDT 2015 and SSAS Tabular Compatibility Level 1400 – MCrassus Dec 17 '19 at 07:48

0 Answers0