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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mtrevisiol
Helper V
Helper V

Calculate an average between sums

Hi everyone!

I've got a sales table like this:

mtrevisiol_0-1628695797576.png

 

My intention is to calculate the average value of of sales, where a sale is identified by the filed DocNo and its value is given by the sum of the single items' values:

mtrevisiol_1-1628695968725.png

 

In this example the average would be (1200+6700+5500)/3 = 4467 €

 

How can I do it in DAX? Thank you!

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@mtrevisiol 

pls try this

Measure = averagex(VALUES('Table'[DocNo]),CALCULATE(sum('Table'[sale value]),ALLEXCEPT('Table','Table'[DocNo])))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@mtrevisiol 

pls try this

Measure = averagex(VALUES('Table'[DocNo]),CALCULATE(sum('Table'[sale value]),ALLEXCEPT('Table','Table'[DocNo])))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.