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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors