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
Mbechet
Frequent Visitor

Average value from second table

Dear All,

I am sure my question is very basic.

I have 2 tables:

- PreviousMonth, in which i get the hours and amount for each persons (1 line per date)

- ThisMonth, in which I get the hours done in the current month by person (1 line per date)

 

I have created a third table to get the unique ID of each person and link both tables together through this third one

Image1.png

I just want to calculate in the Table ThisMonth the average amount per hour for PreviousMonth.

I am using the below measure but I miss something as it gives me the total average independently of the ID of the person.

Image2.png

I have tried to merged the tables but I have too many rows on my actual data and it is taking hours to refresh.

 

Thank you all very much in advance for your help.

1 ACCEPTED SOLUTION
fhill
Resident Rockstar
Resident Rockstar

Make sure your Relationships are set to BOTH for 'Cross Filter Direction' since you are passing thru the ID table to get data from another table.  Also, I tried this less complex Measure allowing ID to be calculated based on the table values instead of forcing the filter (but I think your code works as well).

 

FOrrest

 

 

 

Capture.PNG

 

 

 




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

3 REPLIES 3
fhill
Resident Rockstar
Resident Rockstar

Make sure your Relationships are set to BOTH for 'Cross Filter Direction' since you are passing thru the ID table to get data from another table.  Also, I tried this less complex Measure allowing ID to be calculated based on the table values instead of forcing the filter (but I think your code works as well).

 

FOrrest

 

 

 

Capture.PNG

 

 

 




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Mbechet
Frequent Visitor

Wonderful,

I was sure it was simple! The only issue was the both directions from my tables relationships.

 

Thank you very much and have a great weekend!

Vvelarde
Community Champion
Community Champion

@Mbechet

 

Hi, The ID in your visual This Month is from ID Table?.

 

If answer is no try using this.

 

Regards

 

Victor

Lima Peru




Lima - Peru

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.