Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ovonel
Post Prodigy
Post Prodigy

can't model relationship in power bi

I am not sure how to model this.

 

I have 3 tables.

  • Fact
  • Contract
  • Clients

 

ContractManager1Manager2
1PeterRob
2PeterTim
3TimJames
4PeterJames

 

 

ClientC. Manager1
1P
2NM

 

 

Fact:

SaleContractClient
1011
1012
1022
1032
1042

 

 

Then, the access with RLS will be based on contract. If you are manager1 or manager2 for that contract you shall see it (also if you are c. manager1  on that row you shall see it too).

 

So, for the table for access,  I will do an Unpivot like:

SqlTable  
ContractClient 
11Manager1
11Manager2
11C. Manager1
12Manager1
12Manager2
12C. Manager1
22Manager1
22Manager2
22C. Manager1
32Manager1
32Manager2
32C. Manager1
42Manager1
42Manager2
42C. Manager1

 

 

I have tried this model but it doesnt work:

ovonel_0-1660749124648.png

 

 

Is there a way to achieve this functionality?

1 ACCEPTED SOLUTION
Tutu_in_YYC
Resident Rockstar
Resident Rockstar

Try combining Client and Contract into 1 table e.g ClientContract, and create a composite key that consist of client and contract ID. Use that to connect to Fact ( it means you have to have the same composite key in the Fact )


View solution in original post

1 REPLY 1
Tutu_in_YYC
Resident Rockstar
Resident Rockstar

Try combining Client and Contract into 1 table e.g ClientContract, and create a composite key that consist of client and contract ID. Use that to connect to Fact ( it means you have to have the same composite key in the Fact )


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors