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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
RahulKumarBIT
Regular Visitor

Calculating cummulative total by date and by id

Hi

I am looking to calculate cummulative total by date and by id. My existing table and its three column's are per below

 

DateIDAmount
01/31/20235015
02/28/202350110
01/31/20235023
02/28/20235026

Expected Table with 4rth calculated column-CummulativeAmount

DateIDAmountCummulativeAmount
01/31/202350155
02/28/20235011015
01/31/202350233
02/28/202350269
2 REPLIES 2
some_bih
Super User
Super User

Hi @RahulKumarBIT , create two measures:

Sales Amount = SUM(Sheet2[Amount]) and
Cummulative Amount =
    CALCULATE(
        [Sales Amount],
        DATESYTD(Sheet2[Date])
    )
 
 Columns and ID are from table Sheet2, so you need to adjust to your table name. Please note that visual is created as you shown. I hope this help.
some_bih_0-1686173008143.png

 





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

Proud to be a Super User!






Hi @some_bih

Will DATESYTD work with whole date series before and after 2023 as well as i would need cummulative total as of any dates?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors