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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
reggierevello
Frequent Visitor

Calculate cummulative data

Hi I need help with the following calculation:

 

Based on the table below, I need to calculate the cummulative sum for each salesman based on the date as it shows in the "CummulativeRunRate" coulmn.  A start date needs to be define and the numbers of days of the fiscal month.  Also create the Delta column.

Capture1.PNG

 

 

 

thanks,

Reggie

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@reggierevello

 

How do you want to create your fiscal calendar?

 

I assume you already have a Calendar date in your table, then you can create a fiscal month column like:

 

Fiscal Month = IF(MONTH('Table'[Date])-MONTH(NOW())<=0,MONTH(NOW())-MONTH('Table'[Date])+1,MONTH(NOW())-MONTH('Table'[Date])+13)

Then generate a Fiscal Year column like:

 

 

Fiscal Year =
IF (
    Table[Fiscal Month] < MONTH ( Table[Date] ),
    YEAR ( Table[Date] ),
    YEAR ( Table[Date] ) + 1
)

You can still keep the Day part from Calendar Date.

 

 

To calculate the cumulative date, you can create column like below:

 

Cumulative Total =
CALCULATE (
    SUM ( Table[Sales] ),
    FILTER (
        Table,
        Table[Fiscal Year] = EARLIER ( Table[Fiscal Year] )
            && Table[Fiscal Month] = EARLIER ( Table[Fiscal Month] )
            && Table[Day] <= EARLIER ( Table[Day] )
            && Table[SalesMan] = EARLIER ( Table[SalesMan] )
    )
)

Regards,

 

View solution in original post

1 REPLY 1
v-sihou-msft
Microsoft Employee
Microsoft Employee

@reggierevello

 

How do you want to create your fiscal calendar?

 

I assume you already have a Calendar date in your table, then you can create a fiscal month column like:

 

Fiscal Month = IF(MONTH('Table'[Date])-MONTH(NOW())<=0,MONTH(NOW())-MONTH('Table'[Date])+1,MONTH(NOW())-MONTH('Table'[Date])+13)

Then generate a Fiscal Year column like:

 

 

Fiscal Year =
IF (
    Table[Fiscal Month] < MONTH ( Table[Date] ),
    YEAR ( Table[Date] ),
    YEAR ( Table[Date] ) + 1
)

You can still keep the Day part from Calendar Date.

 

 

To calculate the cumulative date, you can create column like below:

 

Cumulative Total =
CALCULATE (
    SUM ( Table[Sales] ),
    FILTER (
        Table,
        Table[Fiscal Year] = EARLIER ( Table[Fiscal Year] )
            && Table[Fiscal Month] = EARLIER ( Table[Fiscal Month] )
            && Table[Day] <= EARLIER ( Table[Day] )
            && Table[SalesMan] = EARLIER ( Table[SalesMan] )
    )
)

Regards,

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.