0

I am creating a model for Sqlserver Analysis Services (tabular mode) using SSDT. My core measures are in a table with a combined key on UserId and WeekId. I have relations to other tables on UserId and on WeekId. Now I want to add another relation, based on the combination of the two. However, SSDT does not allow me to enter multiple fields when creating a relation.

What should I do? Should I force the measures on a single key? I am a SSAS newby, so maybe I just miss something really obvious.

hanzworld
  • 1,289
  • 1
  • 14
  • 22
Teun D
  • 5,045
  • 1
  • 34
  • 44

1 Answers1

1

You can only use a single column in relationships. You will need to concatenate UserID and WeekID in both tables and then build the relationship.

The alternative is to create a surrogate key integer which is a meaningless identifier that represents the UserID and WeekID combination and add it to both tables.

GregGalloway
  • 11,355
  • 3
  • 16
  • 47