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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

% Weighted Contribution

Hello everyone!

 

I am new to PBI and trying to recreate some calculations I use commonly in MS Excel.

 

One I am having issues with is % Weighted Contribution (% Cont) to YoY Growth. The formula for this is:

 

% W Cont = (YTD Sales - PY Sales) / Total PY Sales

 

CategoryPY SalesYTD Sales% YoY GthGAP% Cont
Cat A1020100.0%1010.0%
Cat B65707.7%55.0%
Cat C2513-48.0%-12-12.0%
TOTAL1001033.0%33.0%

 

Of course, I want to be able to change or filter category, segment, product, etc. without losing this measure.

 

Can you please share with me how to do this in PBI? Thanks in advance!

1 REPLY 1
dedelman_clng
Community Champion
Community Champion

Hi @Anonymous  - 

 

A little confused because your narrative doesn't match your attempted formula, but if you wanted this formula

 

% W Cont = (YTD Sales - PY Sales) / Total PY Sales

 

It could be written like this

 

WeigthedYOY =
VAR __AllPYSales =
    CALCULATE ( SUM ( WeightedPct[PY Sales] ), ALL ( WeightedPct ) )
VAR __Delta =
    SUM ( WeightedPct[YTD Sales] ) - SUM ( WeightedPct[PY Sales] )
RETURN
    DIVIDE ( __Delta, __AllPYSales )

 

2020-10-22 07_42_05-scratch4 - Power BI Desktop.png

 

If this is not the result you are seeking, please share expected results.

 

Hope this helps

David

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.