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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

AVERAGEIFS

Id like to build a new column in my PowerBI table called "average".  the formula that builds the average column I want to be similar to how excel's AVERAGEIFS folrmula works.  Meaning the content of the data in the column is an average dependant on multiple other columns in that table.  So all rows with the same combination of descriptor columns would show the same average number.

 

averageifs example.JPG

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

calculated column=averagex(filter(table,table[vehicle]=earlier(table[vehicle])&&table[size]=earlier(table[size])&&table[color]=earlier(table[color])),table[price])

View solution in original post

3 REPLIES 3
screaminbrod
New Member

Hi there,

Similarly, I am trying to adapt the formula below from excel sheet to power bi.... is this even possible in power query? Where the column will get the average of amount considering based on 5 conditions (previous 4 weeks of the same week day , subgroup and subgroup2 and is greater than 0) and the result for that record will be used when it moves to the next record.

 

=IFERROR(AVERAGEIFS(amount,amount,">0",Weekday,Table1[@[Week Day]:[Week Day]],Subgroup,Table1[@[SubGroup]:[SubGroup]],Subgroup2,Table1[@[SubGroup2]:[SubGroup2]],date,">="&Table1[@[Date]:[Date]]-28),))

 

screaminbrod_0-1683574641283.png

 

Thanks in advance.

wdx223_Daniel
Super User
Super User

calculated column=averagex(filter(table,table[vehicle]=earlier(table[vehicle])&&table[size]=earlier(table[size])&&table[color]=earlier(table[color])),table[price])

Anonymous
Not applicable

That's it, thank you!!!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.