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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ny326n
Frequent Visitor

Sum related when there is a one to many relationship

Hi!

 

I need some help on this one:

 

I have two tables related trough dates

 

Table 1 contains dates as unique value:

1 jan 2017

2 jan 2017

3 jan 2017

 

Table 2 contains one date column and one order value column:

1 jan 2017          345

1 jan 2017          435

2 jan 2017          534

2 jan 2017          354
etc. 

 

What i want to do is to insert the sum of each dates order value from table 2 into table 1. How do I solve this?

 

Thank you in advance! 

1 ACCEPTED SOLUTION

You want it to be loaded in the Table 1 ?

In that case, you need to create a calculated column in Table 1 :

 

Amt = Calculate(Sum(OrderTable[OrderColumn]) )

View solution in original post

5 REPLIES 5
Datatouille
Solution Sage
Solution Sage

Hi,

 

First, make sure you have an active relationship between your 'Dates' Table and your 'Order' Table (View Relationships).

Second, create the following measure: Total Amount = Sum(OrderTable[OrderValue])

Third, create a graph which uses the date from the Dates table as X-axis and the measure "Total Amount" in the "values" field.

Thank you for your reply, however, this is not exacly what I want. I want the order value to sum accordning to the dates. So all rows with 1 jan 2017 in Table 2 sums up on one row, 1 jan 2017 in table 1. By only writing sum it simply sums up the total order value and copy it for each row. 

 

Was this clear? Thanks!

 

You want it to be loaded in the Table 1 ?

In that case, you need to create a calculated column in Table 1 :

 

Amt = Calculate(Sum(OrderTable[OrderColumn]) )

I kept trying group by to get to a similar solution, thanks!

Ah, so easy! Thank you very much! 🙂

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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