cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mlbrga
Frequent Visitor

Running Totals per Month

Hi,

 

I can't seem to run my running totals properly when using the date table (Relationship between First Transaction Date and Date in Date Table) and x-axis categorical type, but functions okay when used with a "Continuous" X-Axis using the First Transaction Date on the Transaction Table.

Continuous using First Transaction Date from Transaction Table:

mlbrga_0-1669945881449.png

Categorical using Date from Date Table: 

mlbrga_1-1669945992928.png

 

Here's the current code:

Running Total Dragonpay Users =
CALCULATE(
    COUNTA('Dragonpay Transactions'[Customer#]),
    FILTER(
        ALLSELECTED('Dragonpay Transactions'[First Transaction Date]),
        ISONORAFTER('Dragonpay Transactions'[First Transaction Date], MAX('Dragonpay Transactions'[First Transaction Date]), DESC)
    )
)
 
I need to be able to summarize the running total in such a way it only shows the running total movement per month, and not per data point. Thank you!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mlbrga , You can have running total like

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

 

if you want it to be reset at the month level

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@mlbrga , You can have running total like

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

 

if you want it to be reset at the month level

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

Thank you so much @amitchandak !

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.