cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
clmigeon
New Member

Sum on different date

Hi all, 

I have two table : 

The 1st with my societe_Id , the cost and the cost date

IdCostDate
187125000

01/01/2019

187255000

01/02/2020

186255000

01/01/2021

187155000

21/01/2021

 

the 2nd with a périod 

Idstart date

end date

18701/01/20

31/12/20

18601/07/20

31/06/20

 

I want to calculate the sum of each cost between the date of the 2nd table. 
I don't find how to, could someone help me ? 

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@clmigeon , A new column table 2

 

new column in Table 2 = sumx(filter(Table1, Table1[ID] = Table2[ID] && Table1[Date] >=Table2[Start Date] && Table1[Date] <= Table2[End DATE]),Table1[Cost])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
amitchandak
Super User IV
Super User IV

@clmigeon , A new column table 2

 

new column in Table 2 = sumx(filter(Table1, Table1[ID] = Table2[ID] && Table1[Date] >=Table2[Start Date] && Table1[Date] <= Table2[End DATE]),Table1[Cost])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors