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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Force indirect relationship in dax?

I have the below model:

 

ovonel_0-1631617992588.png

 

 

 

 

 

ovonel_1-1631618018224.png

 

 

And when I want to display revenue by segment, it just gives me the totals:

ovonel_2-1631618069949.png

 

(The above is wrong; it should roughly be half for A and half for B, but it just displays totals 3 times...)

 

Is there a function in dax I have to use to enforce this segmentation?? (the segmentation comes from ClientType, which is not directly related, but through Client.

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

@Anonymous You could try:

 

 

CALCULATE(
  SUM('Revenue'[Revenue]),
  TREATAS(DISTINCT('ClientType'[ClientNo]),'Client'[ClientNo])
)

 

 

How many records are in each table? Also, the relationships shown in your image seem to be impossible. You have multiple paths between the Client table and the Revenue table and so there is a relationship that would need to be inactive.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Anonymous Well, you could use a technique I call DAX Table Hopping:

Measure = 
  VAR __Clients = DISTINCT('ClientType'[ClientNo])
  VAR __KeyCustomers = DISTINCT(SELECTCOLUMNS(FILTER('Client',[ClientNo] IN __Clients),"__Key_Customer",[Key_Customer]))
RETURN
  SUMX(FILTER('Revenue',[Key_Customer] IN __KeyCustomers),[Revenue])

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

thanks for your answer, unfortunately I get:

ovonel_0-1631622437016.png

 

@Anonymous You could try:

 

 

CALCULATE(
  SUM('Revenue'[Revenue]),
  TREATAS(DISTINCT('ClientType'[ClientNo]),'Client'[ClientNo])
)

 

 

How many records are in each table? Also, the relationships shown in your image seem to be impossible. You have multiple paths between the Client table and the Revenue table and so there is a relationship that would need to be inactive.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (27)