The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
67 | |
34 | |
21 | |
18 | |
15 |
User | Count |
---|---|
124 | |
39 | |
30 | |
24 | |
22 |