Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
I'm trying to figure out the best way to resolve the following situation.
I have this table:
I need to sum the values of [Value] for each Month, and then with the results calculate the average: having as many elements as months grouped, in this example 3.
How would you implement this in DAX? The part of the measure that groups by months has to be filtered by the filter context, meaning that depending of it the number of months may change as well as the number of categories.
Thanks in advance,
Aleix
Solved! Go to Solution.
// Measure 1
[Total Value] = SUM( T[Value] )
// Measure 2
[Avg Monthly Value] =
AVERAGEX(
DISTINCT( T[Month] ),
[Total Value]
)
// Measure 1
[Total Value] = SUM( T[Value] )
// Measure 2
[Avg Monthly Value] =
AVERAGEX(
DISTINCT( T[Month] ),
[Total Value]
)
Yes, I just realized this can be solved this way. Anyway, my doubt or question was trying to understand how to deal with aggregations affected by the filter context inside a formula. Since SUMMARIZED cannot be stored in a variable and has any of its columns referenced. Maybe that was my deep question ; ) Thanks for your answer.
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
18 | |
15 | |
7 | |
6 |