cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbenson
Frequent Visitor

Weighted Basis AVG

i am trying to find the average basis of corn and soybean commodities. i have the basis amont that each contract was purchased at, the total bushels each contract bought and how many different contracts was purchased by a certain person. i am not coming up with the correct avg basis. what is the correct formula. Here is how my columns are laid out. 

 

 

AccountNo     Basis     Bushels

1                      -0.35      1000

1                      -0.35       950

1                      -0.40      1000

1                      -0.35       2000

 

Thank you

1 ACCEPTED SOLUTION
samdthompson
Solution Sage
Solution Sage

Hello, try something like:

 

w_avg = sumx(table, Basis * Bushels) / sumx(table, Bushels)

 

 

// if this is a solution please mark as such. Kudos always appreciated.

View solution in original post

1 REPLY 1
samdthompson
Solution Sage
Solution Sage

Hello, try something like:

 

w_avg = sumx(table, Basis * Bushels) / sumx(table, Bushels)

 

 

// if this is a solution please mark as such. Kudos always appreciated.

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors