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

Create dax that sum two columns of values with a different tables

Hey Everyone,
I want to create Dax that sums two columns of values with different tables per month.
For example: Table a [Total Hours per Month] + Table B [ Valid Hours] on Jan / Feb / March until December.

1.jpg2.jpg

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@dolevh 

you can create a date table and create relationships with both tables.

measure= sum(total hours per month)+sum(valid hours)

Could you pls provide the sample data? Then we can provide proper solution for you





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
dolevh
Helper II
Helper II

Thanks!
but, I'm looking some option without to create date table.

@dolevh 

what do you mean by looking for DAX?

What I provided is a DAX solution. 

So you don't want to create a date table?





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

Proud to be a Super User!




Yes 🙂

@dolevh 

sry, I have no idea why after I clicked post, the message disappears and I accepted my answer as a solution.

 

since I only can see one part of your whole data, not sure if the solution works.

It looks like you only have the first date of every month and not sure if you have duplicated date or not.

TableA

1.PNG

TableB

2.PNG

create a relationship between two tables and create a column

 

Column = SUMX(RELATEDTABLE('Table B'),'Table B'[value])+TableA[value]

 

3.PNG

 





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

Proud to be a Super User!




ryan_mayu
Super User
Super User

@dolevh 

you can create a date table and create relationships with both tables.

measure= sum(total hours per month)+sum(valid hours)

Could you pls provide the sample data? Then we can provide proper solution for you





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

Proud to be a Super User!




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.