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

View all the Fabric Data Days sessions on demand. View schedule

Reply
joaquinel
Helper I
Helper I

Need to join an attribute of a n table

Hi,

 

I need to count contracts from the Fact Table by an Attribute which is three tables away (image below). I don't know how to write correctly the formula. Here you have the simple one. Could you help me? Thanks in advanced.

 

Main formula: CALCULATE(COUNT(ContratosServicio[Id]),USERELATIONSHIP(ContratosServicio[FechaBaja] , calendario[date] ))
 
The main formula is mandatory but I want to join ContratosServicio[Id] with MotivosBaja[Codigo]. My mistake is that i dont know how to unify the  fourth table in the formula. i have been using the formula "userelationship" but it isn't allowed to use. 
 
4thatt.jpg
1 ACCEPTED SOLUTION
ToddChitt
Super User
Super User

This may suffer a bit from the translation engine, but we will try to communicate clearly:

What are you trying to measure here? 

It looks like ContratosServicio is your main dimensin table. It has one to many relationship with the next table, which has one to many relationship to the third table. BUT, then you have a MANY TO ONE relationship to MotivosBaja

You use calendario[date]  in your measure, but I don't see it on the drawing.

 

What are you trying to measure here?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
ToddChitt
Super User
Super User

This may suffer a bit from the translation engine, but we will try to communicate clearly:

What are you trying to measure here? 

It looks like ContratosServicio is your main dimensin table. It has one to many relationship with the next table, which has one to many relationship to the third table. BUT, then you have a MANY TO ONE relationship to MotivosBaja

You use calendario[date]  in your measure, but I don't see it on the drawing.

 

What are you trying to measure here?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





It was the "Directions of filters". Thank you.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI 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.

Top Solution Authors
Top Kudoed Authors