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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pbi_wannabe_exp
Regular Visitor

Weighted AVG Calculation

Hey all,

 

I have the following data table with many names but I only copied the table with 2 names now: setup.py and path.xyz. (date, name, loc_i, loc_d columns are originally in the table, and AGE, Weight, Weighted AVG are calculated.

 

datenameloc_iloc_dAGEWeightWeighted AVG 
24/01/22 13:20:06setup.py410129.44334271.664375 
27/01/22 11:31:23setup.py11126.521126.5198727 
28/01/22 08:54:20setup.py11125.631125.6289352 
09/03/22 08:22:06setup.py2285.652171.3026389 
05/04/22 07:57:04setup.py1058.67158.6687037 
05/04/22 07:54:23setup.py1058.67158.67056713 
27/01/22 09:45:36setup.py22126.592253.1866667 
28/01/22 08:46:19setup.py22125.632251.2690046123.6491
24/01/22 13:20:06path.xyz350129.44263365.55375 
27/01/22 11:31:23path.xyz21126.522253.0397454 
28/01/22 08:54:20path.xyz10125.631125.6289352 
09/03/22 08:22:06path.xyz1085.65185.65131944 
05/04/22 07:57:04path.xyz1058.67158.6687037 
05/04/22 07:54:23path.xyz1158.67158.67056713 
27/01/22 09:45:36path.xyz11126.591126.5933333 
28/01/22 08:46:19path.xyz11125.631125.6345023 
24/01/22 13:30:06path.xyz11129.441129.4374306 
28/01/22 11:31:23path.xyz22125.522251.0397454 
28/01/22 08:55:20path.xyz22125.632251.2564815123.8763

 

Here you can see the formulas behind the calculated columns:

 

pbi.JPG

I would like to create the final calculation in PBI somehow (please note that my data table consists of more than 2 names - thousands).

Many thanks in advance!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Wavg = divide(sumx('Table','Table'[AGE]*'Table'[Weight]),sumx('Table','Table'[Weight]))

 

lbendlin_0-1654274583899.png

see attached

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Wavg = divide(sumx('Table','Table'[AGE]*'Table'[Weight]),sumx('Table','Table'[Weight]))

 

lbendlin_0-1654274583899.png

see attached

Many thanks for your reply!! One thing I dont know is that how I can add weight calculation to the pbi. Only date, name, loc_i, loc_d is in the model. I understand how to add a calculated column measure in case of AGE and Weighted AVG, but what about Weight?

see attached

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.