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
PaulCo
Helper II
Helper II

Calculation based on Column Average

I am pulling data from SFDC which contains the Value of each deal booked and also the discount used for the deal. I want to summarise the data by month to show the Total Value, Average Value and then do a calculation to find the Weighted Average Discount for each month. 

 

The Weighted Average Discount is calculated like this:

 

(Value/Total Value) * Discount = Weighted Average Discount

 

We then sum up the Weighted Average Disounts for each deal to give the Weighted Average Discount that we are looking for.

 

For example, these are the opportunities that closed in a quarter. We get the Opportunity, Month and Discount from the SFDC table but we need to calculate the % of Month Total and the Weighted Average Discount.

 

OpportunityMonthValue% of Month TotalDiscountWeighted Average Discount
1January30060%33%19.80%
2January20040%50%20.00%
3February25042%40%16.67%
4February35058%30%17.50%
5March10033%25%8.33%
6March20067%50%33.33%

 

In this example the Average weighted discount for March would be 41.67% (8.33% + 33.33%).

 

How can I add these calculated columns to my data so that I can do the calculations to find the Weighted Average Discount? 

 

Thanks

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi PaulCo,

 

To achieve your requirement, create a measure using measure like below:

Measure = CALCULATE(SUM(Table1[Weighted Average Discount]), ALLEXCEPT(Table1, Table1[Month]))

1.PNG 

 

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi PaulCo,

 

To achieve your requirement, create a measure using measure like below:

Measure = CALCULATE(SUM(Table1[Weighted Average Discount]), ALLEXCEPT(Table1, Table1[Month]))

1.PNG 

 

Regards,

Jimmy Tao

Perfect, thanks.

 

I had to do a couple of intermediateary steps but I got there with the help of your example.

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!

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.

Top Solution Authors