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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
VFPowerBI
Regular Visitor

Calculte Total Amount to date for each Month by Product

Greeting Community ,

           

             I have an exemple of data  of table : 

Product QTY Date
P1122021-5
P1152021-6
P1162021-7

 

I want to get a column or a table containing the sum of the current month of each row and all the previous months  : 

Product QTY Date
P1122021-5
P1172021-6
P1342021-7

for n Product and  n previous Month/Year

 

Best Regards and Thank You for you Help 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@VFPowerBI , Not sure how 12 + 15 =  17.

 

But try a new column like

sumx(filter(Table, [product] =earlier([product]) && [Date] <=earlier([Date])),[QTY])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@VFPowerBI , Not sure how 12 + 15 =  17.

 

But try a new column like

sumx(filter(Table, [product] =earlier([product]) && [Date] <=earlier([Date])),[QTY])

Thank you it worked .

        Yes, 12+15 = 27 my bad 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.