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
Anonymous
Not applicable

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

@Anonymous , 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

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

Anonymous
Not applicable

Thank you so much @amitchandak !

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.