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

Get Sum of Value by Year in one to many relationship

I have a table "Parts" that stores all information on parts in our system in a table like so:

automated_user_0-1679792326362.png

I also have a table Called "NonConfig-PN" that tracks how many parts were bought and in what year here: 

automated_user_1-1679792464281.png

here is the relationship between the two tables:

automated_user_2-1679792499532.png

What I'm trying to figure out is if it is possible to get the sum of the "Pseudo" (located in NonConfig-PN table) for each "PartNum" in the Parts table for each given year, for example I'll use TS24

automated_user_3-1679792653019.png

In the NonConfig-PN, I check the "PseudoLines" column for the given "PartNum" and then get a sum of the "Pseudo" for each given year shown here: 

automated_user_4-1679793185413.png

So, TS24 in this example would have a sum of 4 in 2021 and a sum of 3 in 2019, 0 all other years. 

 

I would like this done for all parts in the Parts Table. Any help would be appreciated, as I have been stuck on this for a while now. 

Thanks.

1 ACCEPTED SOLUTION
automated_user
Frequent Visitor

After doing a little more digging, I realized that the relationship between the two tables were pointing to the wrong columns.. Once I fixed that, I was able to get my measure to work correctly. 

View solution in original post

1 REPLY 1
automated_user
Frequent Visitor

After doing a little more digging, I realized that the relationship between the two tables were pointing to the wrong columns.. Once I fixed that, I was able to get my measure to work correctly. 

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.