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.
Solved! Go to Solution.
@Anonymous , In case you have selected a year or something from calendar table , then prefer to use all in calendar filter
2014 Average = CALCULATE(AVERAGE('Strategic Projects'[Local Content (%)]),filter(all('Calendar'),'Calendar'[Date]="2014"))
2020 Average = CALCULATE(AVERAGE('Strategic Projects'[Local Content (%)]),filter(all('Calendar'),'Calendar'[Date]="2014"))
2020 to 2014 difference = [2020 Average]-[2014 Average]
Hi @Anonymous ,
According to your description, data was created from 2014 to 2020:
Here are the steps you can follow:
1. Create calaculated column.
Year = YEAR('Table'[Date])
2. Create measure.
avg_year =
var _firstyear=MIN('Table'[Year])
var _lastyear=MAX('Table'[Year])
return
CALCULATE(AVERAGE('Table'[amount]),ALLEXCEPT('Table','Table'[Year]),FILTER('Table','Table'[Year]=_firstyear))
-
CALCULATE(AVERAGE('Table'[amount]),ALLEXCEPT('Table','Table'[Year]),FILTER('Table','Table'[Year]=_lastyear))
3. Result
Put the year field in the slicer, and set the AVG_ Year is put into the card, two years are selected in the slicer, and the average value of these two years is shown in the card
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , In case you have selected a year or something from calendar table , then prefer to use all in calendar filter
2014 Average = CALCULATE(AVERAGE('Strategic Projects'[Local Content (%)]),filter(all('Calendar'),'Calendar'[Date]="2014"))
2020 Average = CALCULATE(AVERAGE('Strategic Projects'[Local Content (%)]),filter(all('Calendar'),'Calendar'[Date]="2014"))
2020 to 2014 difference = [2020 Average]-[2014 Average]
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
61 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |