Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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})
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |