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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi, Need quick help to calculate average, based on selected Year and Month filter.
expected result
Solved! Go to Solution.
@MarshalSK , This seems like sum not avg
New measures
Sumx(filter(allselected(Table), Table[Year] = max(Table[Year]) && Table[Month] = max(Table[Month]) ), [Sales])
or
Avg
AverageX(filter(allselected(Table), Table[Year] = max(Table[Year]) && Table[Month] = max(Table[Month]) ), [Sales])
Always better to have date table in such cases. Create a date with help from month and year and then have column like year , month in date tbale and have meausres like
(Date table joined with date of your table)
AverageX(filter(allselected(Table), eomonth(Table[Date],0) = eomonth(max(Table[Month]),0) ), [Sales])
@MarshalSK , This seems like sum not avg
New measures
Sumx(filter(allselected(Table), Table[Year] = max(Table[Year]) && Table[Month] = max(Table[Month]) ), [Sales])
or
Avg
AverageX(filter(allselected(Table), Table[Year] = max(Table[Year]) && Table[Month] = max(Table[Month]) ), [Sales])
Always better to have date table in such cases. Create a date with help from month and year and then have column like year , month in date tbale and have meausres like
(Date table joined with date of your table)
AverageX(filter(allselected(Table), eomonth(Table[Date],0) = eomonth(max(Table[Month]),0) ), [Sales])
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.