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
philseim
Frequent Visitor

swapping between relationships

Hi

 

I am working with two tables dimBranch and dimClient. A client belongs to a Branch and a salesperson. A salesperson belongs to a Branch.

 

As an example branch A and Branch B. A salesperson can belong to branch A but sell on behalf of branch B.

The client will belong to branch B but be under that salesperson sales number. I need to create a board where I can filter either by branch or salesperson. Depending on what I select the board should show the salesperson or the numbers for all clients in that branch. I need to be able to view the board from a salesperson perspective or a branch. 

 

I've tried userelationship but you can't put measures as a filter is there another way to do this so they can both share the same branch filter. 

image.png

 

5 REPLIES 5
LivioLanzo
Solution Sage
Solution Sage

Hi @philseim

 

could you show a more visual example?

I am understanding that one Sales Person can belong either to Branch A or B or multiple branches, is it correct?

 

A client can belong to multiple branches and or sales persons?

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Thanks for the fast reply

 

A salesperson can only really belong to one branch but they can sell on behalf of another branch.

 

Another way of looking at it is I want a list of all salesperson belongong to the branch but also a list of clients belonging to that branch.

 

 

Below is an excel mockup:

Client CodeBranchSalesperson
ABCAmsterdamMr X
XYZAmsterdamMr Y
   
SalespersonSalesperson Branch 
Mr XAmsterdam 
Mr YFrankfurt 
   
   
FiguresFees 
ABC100 
XYZ120 


I want to filter my board on Amsterdam and get a figure of 220. But I want to have the ability to see Mr X belongs to Amserdam as an additional filter and be able to filter on that to get the figure and then get the value of 100. So my filter on salesperson would use something like userelationship in DAX

 

My board looks like something below:

image.png

Hi again @philseim

 

for Frankfurt, I am assuming you want to see 120 ?

 

 

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Frankfurt by itself would have 0 becasue it has no clients. The client ABC, XYZ beling to Amsterdam. However if a user selects Frankfurt then selects Mr Y the user should see 120 on the report. So the relationship needs to swap.

 

That userrealtionship measure would work but it doesn't work in filters

Would this be a fair representation of what you are after?

 

2018-11-12_16-39-07.jpg

 

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

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.