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.
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))
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 |
---|---|
47 | |
24 | |
20 | |
15 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
18 |