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! Request now

Reply
RickardBengzon
Frequent Visitor

SUM values in one table from another table

I have two tables. They are connected by date. And Date in table one is Unique.

I want to sum the values from table2 two in a column in table one.

 

Any tips?

 

RickardBengzon_0-1642596570849.png

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @RickardBengzon 

Try this,

Sum of Value = 
    var _value = CALCULATE(SUM(Table2[Value]),FILTER(ALL(Table2),Table2[Date]=MIN(Table1[Date])))
return IF(ISBLANK(_value),0,_value)

vxiaotang_0-1642995057914.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Schwadenfeld
Helper I
Helper I

same issue here, any solution? 🙂 thanks!

v-xiaotang
Community Support
Community Support

Hi @RickardBengzon 

Try this,

Sum of Value = 
    var _value = CALCULATE(SUM(Table2[Value]),FILTER(ALL(Table2),Table2[Date]=MIN(Table1[Date])))
return IF(ISBLANK(_value),0,_value)

vxiaotang_0-1642995057914.png

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Fowmy
Super User
Super User

@RickardBengzon 
Add the following column in Table 1

Total = CALCULATE ( SUM ( Table2[Value]) )




Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

I don't get any result from that If I remove "CALCULATE" and only use sum I get the total sum of all value for all dates

@RickardBengzon 

Please try this:

Total = 
SUMX( 
    FILTER( Table2 ,  Table2[Date]  = Table1[Date] ),
    Table2[Value]
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Seems legit but still doesn't work. I get no values at all... Thinking if there is somethings wrong with the date-connection... But they both seeem to be the same... 

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