cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Cumulative total as continuous line on graph

I am trying to show the cumulative total of revenue as a continuous line on a graph, This is the formula I am using for my cumulative total:

`Cumulative Revenue = CALCULATE(SUM('Invoice by Task and Date'[Actual Revenue]), Filter(ALLSELECTED('Invoice by Task and Date'), 'Invoice by Task and Date'[Gl_Date]<=MAX('Invoice by Task and Date'[Gl_Date])))`

But then when I graph it against my Calendar (one I built that shows project life by month), if there is no invoice data for a particular month, the cumulative total line has a gap in it as shown below. I want a continuous line from the first invoice through the last.

Any ideas how to make the cumulative revenue line continuous? The cost works because there is data for each month. Any help is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Memorable Member

## Re: Cumulative total as continuous line on graph

You need to use the actual calendar table in your measure as well.

`Cumulative Revenue = CALCULATE(SUM('Invoice by Task and Date'[Actual Revenue]), Filter(ALL(Calendar), Calendar[Date] <= MAX(Calendar[Date])))`
6 REPLIES 6
Memorable Member

## Re: Cumulative total as continuous line on graph

This is one of the reasons you really want to create a true and separate "Calendar Table" or "Date Table", then create a relationship between the calendar and your GL.   Your calendar will have all dates, so it will magically work out...

Frequent Visitor

## Re: Cumulative total as continuous line on graph

I do have a completely separate Calendar Table, and there is a relationship between the two using the date of each invoice. But even with that I cannot figure out how to show the cumulation during the months when there was no invoice. Is there a different formula that works better? Thank you for the help

Memorable Member

## Re: Cumulative total as continuous line on graph

You need to use the actual calendar table in your measure as well.

`Cumulative Revenue = CALCULATE(SUM('Invoice by Task and Date'[Actual Revenue]), Filter(ALL(Calendar), Calendar[Date] <= MAX(Calendar[Date])))`
Frequent Visitor

## Re: Cumulative total as continuous line on graph

Okay so that gets rid of the gaps (thanks!) but now it runs continuous to the end of my Calendar rather than stopping at the date of the lasy invoice. Any further advice?

Memorable Member

## Re: Cumulative total as continuous line on graph

If you have some way to trim your calendar days to the end of your sales data, that is best.

Otherwise you will need to filter your cumulative total measure to dates <= "last sale date" which you could write in a separate measure.
Frequent Visitor

## Re: Cumulative total as continuous line on graph

thank you so much!

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors