Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 |
Solved! Go to Solution.
@Anonymous
Try this measure
Measure = VAR myyear=SELECTEDVALUE(Table1[Year]) RETURN CALCULATE(average(Table1[Goodwill]),Table1[Year] in {myyear,myyear-1})
@Anonymous
Try this measure
Measure = VAR myyear=SELECTEDVALUE(Table1[Year]) RETURN CALCULATE(average(Table1[Goodwill]),Table1[Year] in {myyear,myyear-1})
User | Count |
---|---|
98 | |
90 | |
78 | |
72 | |
65 |
User | Count |
---|---|
114 | |
98 | |
96 | |
68 | |
67 |