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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
icturion
Resolver II
Resolver II

How to SUM different columns based on dates in different columns

Hello,

 

I have a table with two date columns and two columns of values.

Now the intention is to add up all values ​​per date.

table1.JPG

So look up the dates in dateIn and DateOut and then add the values from work1 and work2 together.

then this should be the result:

result.JPG

this is an example of my manual calculation. the aim is to find the same date in DateIn and DateOut and then add it to DateIn Work1 and DateOut Work2. to then plot the total on the joint date.

logic.JPG

 

Hopefully someone has a smart solution to help me. thank you in advance.

1 ACCEPTED SOLUTION

I found a solution.

 

i added a column tot sum work1:

totalwork1= List.Sum(Table.SelectRows (Tabel1, (temp) => temp[DateIn] = [Date])[Work1])

and a column tot sum work2:

totalwork1= List.Sum(Table.SelectRows (Tabel1, (temp) => temp[DateIn] = [Date])[Work2])

after that i added another column: total = totalwork1 + totalwork2

 

this is the result:

ressult.JPG

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@icturion , Logic is not clear. Refer if this link can help

 

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

this is an example of my manual calculation. 

logic.JPG

the aim is to find the same date in DateIn and DateOut and then add it to DateIn Work1 and DateOut Work2. to then plot the total on the joint date.

I found a solution.

 

i added a column tot sum work1:

totalwork1= List.Sum(Table.SelectRows (Tabel1, (temp) => temp[DateIn] = [Date])[Work1])

and a column tot sum work2:

totalwork1= List.Sum(Table.SelectRows (Tabel1, (temp) => temp[DateIn] = [Date])[Work2])

after that i added another column: total = totalwork1 + totalwork2

 

this is the result:

ressult.JPG

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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