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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.