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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
sadsmileyface
Regular Visitor

Can I find the Average of values in a column using a calculated column rather than a measure?

Would it be possible to create a caluclated column that could find the average of each salesmans sales so that looks a little like this example?

 

DaySalesmanSalesAverage
MondayJohn200277.5
MondaySteve350625
MondayBilly100170
TuesdayJohn355277.5
TuesdaySteve900625
TuesdayBilly240170

 

I know I could format the a total to show the average in a visual and I have a measure that does the same thing, but I was wondering if I could do this in a calulated column? 

1 ACCEPTED SOLUTION
ppm1
Solution Sage
Solution Sage

Please try this column expression. Replace T1 with your actual table name.

AvgSales =
CALCULATE (
    AVERAGE ( T1[Sales] ),
    ALLEXCEPT ( T1, T1[Salesman] ),
    T1[Sales] > 0
)

Pat

Microsoft Employee

View solution in original post

4 REPLIES 4
ppm1
Solution Sage
Solution Sage

Please try this column expression. Replace T1 with your actual table name.

AvgSales =
CALCULATE (
    AVERAGE ( T1[Sales] ),
    ALLEXCEPT ( T1, T1[Salesman] ),
    T1[Sales] > 0
)

Pat

Microsoft Employee

Outstanding, that's cracked it! You two have been brilliant help! 

PhilipTreacy
Super User
Super User

Hi @sadsmileyface 

 

Try this

 

Avg = CALCULATE(AVERAGEX('DataTable','DataTable'[Sales]), FILTER('DataTable', 'DataTable'[Salesman] = EARLIER('DataTable'[Salesman])))

 

 

PhilipTreacy_0-1668734076653.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Oh that is fantastic! Would you know how I could exclude any values that were 0 and / or blanks? 

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.

Top Solution Authors