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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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])
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!