cancel
Showing results for
Did you mean:
Frequent Visitor

## Cumulative Line Chart to compare performance of multiple products over time

Hi - I am trying to compare the performance of multiple products over time (years), using a line chart.
At the moment I am using a Measure called Cumulative Value to sum the cost and revenue for each year individually, so getting each product each year is fine.
What I want to do now is extend this to accumulate year on year, over time. In a line-chart format. But I can't seem to do this in a line-chart format. This is pretty easy to do in Excel, see photo below (couldn't see how to upload the full file).
Any suggestions?
FYI here is my current formula, Cumulative Value = CALCULATE(SUM('Data Table'[Value] ),FILTER(ALL('Data Table'[Date]),('Data Table'[Date]<=MAX('Data Table'[Date]))))

Sample chart (easy in Excel)

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

## Re: Cumulative Line Chart to compare performance of multiple products over time

For time intelligence functions Ive fount it best to have a separate date table (with unique dates) and create a relationship with your exsisting data table.

Assuming your new date table is called  DateKey and the column called Date , try the following

Cumulative Value = CALCULATE(SUM('Data Table'[Value] ),FILTER(ALL(DateKey),DateKey[Date]<=MAX('Data table'[Date])))

Hope this helps

2 REPLIES 2
Frequent Visitor

## Re: Cumulative Line Chart to compare performance of multiple products over time

For time intelligence functions Ive fount it best to have a separate date table (with unique dates) and create a relationship with your exsisting data table.

Assuming your new date table is called  DateKey and the column called Date , try the following

Cumulative Value = CALCULATE(SUM('Data Table'[Value] ),FILTER(ALL(DateKey),DateKey[Date]<=MAX('Data table'[Date])))

Hope this helps

Highlighted
Frequent Visitor

## Re: Cumulative Line Chart to compare performance of multiple products over time

Thanks KamK, that seems to do the trick. I haven't considered the idea of using a separate Dates table previously so will need to get my head around how I can use these going forward. Cheers!

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 129 members 1,591 guests
Recent signins: