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
MyraB
New Member

many to many relationship between dimensions

I have two dimensions customer and Account that are related to each other using a factlessfact (CustomerAccount),  The two dimensions are related to other facts (Sales..etc).

I want to be able to show all values from Account dimension related to a customer. Currently it only shows the accounts related to the customer only if they have a transaction in Sales.

I want to avoid using bi-direction. What is the best way to be able to show all accounts related to a customer irrespective of transaction in sales

 

MyraB_0-1652706637228.png

 

1 ACCEPTED SOLUTION
speedramps
Super User
Super User

Novices often think they "must" import excatly the same data model as the data source.

 

Whereas it is best pratice to data model your data in the queries to a star schema.

 

Try merge Custommer, Customr account and acount in to one table.

 

Then have a 1 : M relationship to Sales

 

This dax measure

HasSales = INT(NOT(ISEMPTY(Sales)))
will return 1 if your context has any sales.

Eg Region, Customer, Salesrep or Account  

 

please clcik thumbs up and accept as solution buttons. thanks

View solution in original post

1 REPLY 1
speedramps
Super User
Super User

Novices often think they "must" import excatly the same data model as the data source.

 

Whereas it is best pratice to data model your data in the queries to a star schema.

 

Try merge Custommer, Customr account and acount in to one table.

 

Then have a 1 : M relationship to Sales

 

This dax measure

HasSales = INT(NOT(ISEMPTY(Sales)))
will return 1 if your context has any sales.

Eg Region, Customer, Salesrep or Account  

 

please clcik thumbs up and accept as solution buttons. thanks

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.