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
clmigeon
Frequent Visitor

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
Super User

@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])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@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])

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.