skip to main content
Power BI
    • What is Power BI
    • Why Power BI
    • Customer stories
    • Data visuals
    • Security
    • Power BI Desktop
    • Power BI Pro
    • Power BI Premium
    • Power BI Mobile
    • Power BI Embedded
    • Power BI Report Server
  • Pricing
    • Azure + Power BI
    • Microsoft 365 + Power BI
    • Dynamics 365 + Power BI
      • Energy
      • Healthcare
      • Manufacturing
      • Media
      • Retail
    • For analysts
    • For IT
      • Overview
      • Embedded analytics
      • Power BI visuals
      • Automation
      • Documentation
      • Community
    • Overview
    • Find consulting services
    • Partner showcase
    • Find a partner
    • Become a partner
    • Instructor-led training
    • Getting started
      • Overview
      • Online workshops
      • Self-guided learning
      • Webinars
      • Documentation
      • Roadmap
      • Overview
      • Issues
      • Give feedback
    • Blog
    • Business intelligence topics
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • Events
    • User groups
    • Community blog
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Galleries
    • Community Connections & How-To Videos
    • COVID-19 Data Stories Gallery
    • Themes Gallery
    • Data Stories Gallery
    • R Script Showcase
    • Webinars and Video Gallery
    • Quick Measures Gallery
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Events
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Microsoft Power BI Community
    • Galleries
    • Quick Measures Gallery
    • Running total

    Running total

    07-25-2017 06:17 AM - last edited 07-25-2017 06:28 AM

    Anonymous
    Not applicable
    41897 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    Anonymous
    Not applicable
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Running total

    ‎07-25-2017 06:17 AM

    NAME:

    Running total performance measure

     

    DESCRIPTION:

    Calculate the running total of some column containing numerical values over any given period of time.

     

    PARAMETERS:

    Name: Base value

    Tooltip: The value you want to measure the running total performance on.

    Type: Numerical field / measure

     

    Name: Dates

    Tooltip: The dates interval wherein you want to calculate the running total.

    Type: Date field

     

    DAX:

    Approach if you have a time dimension:

     

    Running total of {Base value} =

    Calculate(

     SUM({Base value}),

     FILTER(

      (ALL({Dates}),

      {Dates} <= MAX ( {Dates from time dimension} )

     )

    )

     

    Approach if you don't have a time dimension (this will only work if you have a row for each period of {Dates} in your date column):

     

    Running total of {Base value} =

    Calculate(

     SUM({Base value}),

     FILTER(

      (ALL({Dates}),

      {Dates} <= MAX ( {Dates} )

     )

    )

     

     

    If you take a look at the .pbix, you'll find syntax for creating a time dimension and making the monthname + year column.

     

    Don't hesitate to ask about the measure. I'll gladly elaborate on anything regarding it.

    Preview file
    155 KB
    Running total.pbix
    Labels:
    • Labels:
    • Financial
    • Time Intelligence
    Message 1 of 7
    41,897 Views
    7
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    Anonymous
    Not applicable
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎05-29-2018 10:17 PM

    I have DataSet like Three Years(2016,2017,2018) and Want to show in line chart running total with X-axis as Month of every year and Y-axis having Price. When i implemented this dax for 2016,2017,2018 all are overlapping(having same value).

    Message 5 of 7
    37,775 Views
    0
    Reply
    ArulselvanD07
    ArulselvanD07 Helper I
    Helper I
    In response to Anonymous
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎05-31-2018 08:44 PM

    Hi @Anonymous,

     

    Pls share the data, your current result and the expected results. If possible please share the pbix file as well.

     

    Thanks

    Message 6 of 7
    37,713 Views
    0
    Reply
    Anonymous
    Not applicable
    In response to ArulselvanD07
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎06-04-2018 10:24 PM

    Hi @ArulselvanD07 

     

    Thanks I have figured it out where i was wrong. I just updated your DAX as per my requirements. Now its working fine.

    Message 7 of 7
    37,640 Views
    0
    Reply
    Anonymous
    Not applicable
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎07-25-2017 06:28 AM

    I've edited a little in the post. There were a typo in the DAX formulas.

    Message 2 of 7
    41,867 Views
    0
    Reply
    wynhopkins
    wynhopkins
    MVP
    In response to Anonymous
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎10-17-2017 12:02 AM

    I'd really like to see this implemented.   I'd label this Lifetime To Date

    Message 3 of 7
    41,464 Views
    1
    Reply
    ArulselvanD07
    ArulselvanD07 Helper I
    Helper I
    In response to wynhopkins
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎05-01-2018 08:20 AM

    Hi @Anonymous Is it possible to calculate running total for a measure instead of a physical column? Please let me know, thanks

    Message 4 of 7
    38,459 Views
    0
    Reply

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    • Sign in
    • Sign up

    Browse

    • Solutions
    • Partners
    • Consulting Services

    Downloads

    • Power BI Desktop
    • Power BI Mobile
    • Power BI Report Server
    • See all downloads

    Learn

    • Guided learning
    • Documentation
    • Support
    • Community
    • Give feedback
    • Webinars
    • Developers
    • Blog
    • Newsletter

    © 2023 Microsoft

    Follow Power BI

    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices