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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
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...
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...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.