cancel
Showing results for
Did you mean:
Highlighted
Regular Visitor

Calculate average of data at different levels by year

Hi

I have the following Data :

 Company Year Goodwill Revenue Company A 2018 773 5191 CompanyB 2018 785 8675 Company A 2017 543 5352 CompanyB 2017 287 8178 Company A 2016 893 6210 CompanyB 2016 514 7959 Company A 2015 306 7690 CompanyB 2015 566 7360

I want to achieve a solution where, when I filter year it returns me the average of Goodwill of that year and the previous year.

So for my year filter 2017: Average of Goodwill in 2017,2016

year filter 2016: Average of Goodwill in 2016,2015

.... and so on

The year is in General format (NOT Date format) ..

Expected OUTPUT Values:

 Company A 2018 658 CompanyB 2018 536 Company A 2017 718 CompanyB 2017 400.5 Company A 2016 599.5 CompanyB 2016 540 Company A 2015 306 CompanyB 2015 566
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User I

Try this measure

```Measure = VAR myyear=SELECTEDVALUE(Table1[Year])
RETURN
CALCULATE(average(Table1[Goodwill]),Table1[Year] in {myyear,myyear-1})```
Regards,
Zubair

Highlighted
Super User I

Try this measure

```Measure = VAR myyear=SELECTEDVALUE(Table1[Year])
RETURN
CALCULATE(average(Table1[Goodwill]),Table1[Year] in {myyear,myyear-1})```
Regards,
Zubair

Announcements

Power Platform Community Conference

Check out the on demand sessions that are available now!

Microsoft Power Platform Communities

Check out the Winners!

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors