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
raymond
Post Patron
Post Patron

Weighted Values

Dear Community,

 

I want to calculate a simple weighted value. 

The total and filter resistant sum a value should be divided by the total and filter resistant sum of weight. Next this number should be multiplied with the target variable by row.

 

See the Image:

2018-12-03 09_00_10-Little Test - Excel.png

2 ACCEPTED SOLUTIONS
v-juanli-msft
Community Support
Community Support

Hi @raymond

Create a measure

final_output =
DIVIDE (
    CALCULATE ( SUM ( Sheet2[value] ), ALL ( Sheet2 ) ),
    CALCULATE ( SUM ( Sheet2[weight] ), ALL ( Sheet2 ) )
)
    * MAX ( [weight] )

1.png

 

Best Regards

Maggie

View solution in original post

Hi @raymond

I didn't realize the column "weight value" is what you want until now.

to get the same value as  "weight value" , you could set the date format of "final_output" as below.

8.png

 

Best Regards

Maggie

 

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @raymond

Create a measure

final_output =
DIVIDE (
    CALCULATE ( SUM ( Sheet2[value] ), ALL ( Sheet2 ) ),
    CALCULATE ( SUM ( Sheet2[weight] ), ALL ( Sheet2 ) )
)
    * MAX ( [weight] )

1.png

 

Best Regards

Maggie

@v-juanli-msft Thanks for getting back to me. 

One question. What is the difference between the column "weight value" and "final_output"? If there is a calculation for the first, could you share that as well?

Hi @raymond

I didn't realize the column "weight value" is what you want until now.

to get the same value as  "weight value" , you could set the date format of "final_output" as below.

8.png

 

Best Regards

Maggie

 

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.