cancel
Showing results for
Did you mean:
Highlighted
Member

## Running Totals (Accumulative) and Running Average

Hi,

I need help with getting the measures right for an Accumulative score and a running Average score.

This formula works if I do not filter:

```Running Total Score =
CALCULATE(
SUM(data[Score]),
FILTER(
ALL(data[Period]),
data[Period]<=MAX(data[Period])
))```

I tried this one:

```Running Totals w SUMX =
CALCULATE(
SUMX(VALUES(data[Period]),[Total Score]),
FILTER(
ALL(data),
data[Period]<=MAX(data[Period]))
)```

But it is also not working when I filter.

Thank you, Tamir

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Running Totals (Accumulative) and Running Average

hi, @Tamir

Whether this formula that fits your needs

`Running Total Score = CALCULATE( SUM(data[Score]), FILTER( ALLSELECTED(data[Period]), data[Period]<=MAX(data[Period]) ))`

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team

## Re: Running Totals (Accumulative) and Running Average

hi, @Tamir

Whether this formula that fits your needs

`Running Total Score = CALCULATE( SUM(data[Score]), FILTER( ALLSELECTED(data[Period]), data[Period]<=MAX(data[Period]) ))`

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Member

## Re: Running Totals (Accumulative) and Running Average

Thank you for your solution, I believe it to work.

However, I finally came up with this formula:

```Overall Performance YTD =
CALCULATE(
SUMX(VALUES(dimCalendar[MonthNum]),[Overall Performance]),
FILTER(
ALLSELECTED(dimCalendar[MonthNum]),
dimCalendar[MonthNum]<=MAX(dimCalendar[MonthNum]))
)```

It works fine.

However, how can I use the above format if the leading column is a string and not numeric?

The MAX function will not be usable...

One use would be if my column is a named month rather then a number...

Or a name of a category...

Thank you,

Tamir

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: 544 members 4,273 guests
Recent signins: