Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Aggregate functions

Hi Community,

 

I am new to Power BI and hence I'd need help with creating DAX Formulas.

I have two columns 1) Week (the date values are in 7 days interval) 2)  Quantity

I would need the Minimum, Maximum and Average of Quantity based on the week column(Precisely past 6 weeks from the current week) - I will be using these aggregates on the Line values in a chart projecting over the weeks. My question is:

1) Do I create a Measure or a new column

2)  DAX query or the syntax would be helpful.

 

Thanks 🙂

1 REPLY 1
az38
Community Champion
Community Champion

Hi @Anonymous 

try a measures

Minimum = CALCULATE(MIN('Table'[Quantity]), ALLEXCEPT('Table', 'Table'[Week]))
Maximum = CALCULATE(MAX('Table'[Quantity]), ALLEXCEPT('Table', 'Table'[Week]))
Avg = CALCULATE(AVERAGE('Table'[Quantity]), ALLEXCEPT('Table', 'Table'[Week]))​

 where "Table' - your table name, [Week] - name of column with week

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.