Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a measure which is calculates % diff for each month of year across multiple years. Now, I would like to calculate the average of all the months for each year separately and plot both of them in teh same graph.
If you see the data below, the column YOY Avg is a measure and it calculates for each month. Now, I want to calculate the last column Avg which is the avg of all YOY values for 2019.
I am unable to come up with a DAX formula that does that. Here is what i used :
MonthStartDate | YOY Avg | Year | Avg |
1/1/2019 0:00 | -5% | 2019 | 1% |
2/1/2019 0:00 | -8% | 2019 | 1% |
3/1/2019 0:00 | 2% | 2019 | 1% |
4/1/2019 0:00 | 15% | 2019 | 1% |
5/1/2019 0:00 | -3% | 2019 | 1% |
6/1/2019 0:00 | -6% | 2019 | 1% |
7/1/2019 0:00 | 2% | 2019 | 1% |
8/1/2019 0:00 | 4% | 2019 | 1% |
9/1/2019 0:00 | 4% | 2019 | 1% |
10/1/2019 0:00 | 2% | 2019 | 1% |
11/1/2019 0:00 | 4% | 2019 | 1% |
12/1/2019 0:00 | 5% | 2019 | 1% |
1/1/2020 0:00 | 6% | 2020 | 3% |
2/1/2020 0:00 | 8% | 2020 | 3% |
3/1/2020 0:00 | 8% | 2020 | 3% |
4/1/2020 0:00 | 1% | 2020 | 3% |
5/1/2020 0:00 | 18% | 2020 | 3% |
6/1/2020 0:00 | 0% | 2020 | 3% |
7/1/2020 0:00 | -2% | 2020 | 3% |
8/1/2020 0:00 | -2% | 2020 | 3% |
9/1/2020 0:00 | 0% | 2020 | 3% |
10/1/2020 0:00 | 1% | 2020 | 3% |
11/1/2020 0:00 | 4% | 2020 | 3% |
12/1/2020 0:00 | -1% | 2020 | 3% |
@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Try like
Avg = AVERAGEX(allexcept(TABLE,TABLE[Month year]),[YOYMeasure])
or
Avg = AVERAGEX(allexcept(TABLE,TABLE[year]),[YOYMeasure])
Avg = AVERAGEX(all(TABLE),[YOYMeasure])
Avg = calculate(AVERAGEX(values(TABLE[Date]),[YOYMeasure]),all(Table))
User | Count |
---|---|
51 | |
28 | |
19 | |
18 | |
14 |
User | Count |
---|---|
91 | |
86 | |
39 | |
23 | |
22 |