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
PetrK
Helper II
Helper II

Sum values from two columns in another table

Hi,

which formula calculate values in "calculated column" in table 1?

Tables has relationship based on column "id"

obrazek.png

 

Thank you

1 ACCEPTED SOLUTION

Thank you for good idea, I used nad creted faster sollution 

column = CALCULATE( SUM(table2[A]) + SUM(table2[B]), Filter(table2, table1[id]=table2[id]))

View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@PetrK 

pls try this

Column = RELATED(Table2[A])+RELATED(Table2[B])
1.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




thank you, and how to do same but with tables which have not relationship?

@PetrK 

you can try this

Column = sumx(FILTER(Table2,'Table1'[id]=Table2[id]),'Table2'[A])+sumx(FILTER(Table2,'Table1'[id]=Table2[id]),'Table2'[B])




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you for good idea, I used nad creted faster sollution 

column = CALCULATE( SUM(table2[A]) + SUM(table2[B]), Filter(table2, table1[id]=table2[id]))

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.