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
nesselman
Helper I
Helper I

Sum by Column while ignoring a Relationship

nesselman_1-1613474932924.png

 

At the time of Sales the Mgr of Record is captured and in the future that Collection should be reported against that Mgr of Record, even if the Rep of Record transfers to another Mgr.

 

nesselman_0-1613474847731.png

I can get the answer in a separate table (a sales only table using MgrTable.MgrName and a collections only table using CollectionsTable.MgrofRecord), however, because of the relationship with RepTable.CurrentMgr-to-MgrTable.MgrName I can't seem to get them on the same data table.

 

I've attempted measures and columns under both CollectionsTable and MgrTable.

 

After searching and attempting many of the solutions for ignoring relationships, or using lookupvalue... I am now asking the community.

 

I'm now prepared to say, "doh!" - Thank you in advance.

 

1 ACCEPTED SOLUTION
nesselman
Helper I
Helper I

Thank you.  I ended up finding this BI Consulting Pro video (https://www.youtube.com/watch?v=PzqML-U-lnY) and figured out a solution:

 

1) Created an inactive relationship between MgrTable.MgrName and CollectionsTable.MgrOfRecord

2) Then using USERELATIONSHIP

 

CollNet2CompedMgr = CALCULATE(sum(CollectionsTable[Coll (Net)]),USERELATIONSHIP(CollectionsTable[MgrOfRecord],MgrTable[MgrName]))
 
Regards.

View solution in original post

2 REPLIES 2
nesselman
Helper I
Helper I

Thank you.  I ended up finding this BI Consulting Pro video (https://www.youtube.com/watch?v=PzqML-U-lnY) and figured out a solution:

 

1) Created an inactive relationship between MgrTable.MgrName and CollectionsTable.MgrOfRecord

2) Then using USERELATIONSHIP

 

CollNet2CompedMgr = CALCULATE(sum(CollectionsTable[Coll (Net)]),USERELATIONSHIP(CollectionsTable[MgrOfRecord],MgrTable[MgrName]))
 
Regards.
lbendlin
Super User
Super User

I would create a reference table with the transactionID and the Manager of record,  and then add that table to your data model.  Technically this would be the same as using "Manager of Record" instead of "Current Manager" in your visual.  Have you tried that?

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.