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
PshemekFLK
Helper IV
Helper IV

SUMX weighted average doesn't work

Hi,

 

I can't figure out why sumx doesn't result in the correct weighted average:

 

PshemekFLK_0-1616508399501.png

Formula for Funnel Speed (Months) = 

IF( HASONEVALUE('Funnel Data'[Opportunity Closed Mo No]),
     SUM('Funnel Data'[Funnel Speed])/30,
             DIVIDE(SUMX('Funnel Data','Funnel Data'[Funnel Speed]/30*'Funnel Data'[Opportunities Won Value USD]),
                       SUM('Funnel Data'[Opportunities Won Value USD])))
 
The correct result for Total should be ((15,561*1.9)+(17,999)*0.4)+(47,335*3.9))/80,895 = 221,337/80,895 = 2.7 instead of 1.2
 
There are visual filters applied on that matrix. Is that the issue?
 

 

 

3 REPLIES 3
amitchandak
Super User
Super User

@PshemekFLK , try a measure like

 


Formula for Funnel Speed (Months) =
IF( Sumx(values('Funnel Data'[Opportunity Closed Mo No]),calculate(
SUM('Funnel Data'[Funnel Speed])/30,
DIVIDE(SUMX('Funnel Data','Funnel Data'[Funnel Speed]/30*'Funnel Data'[Opportunities Won Value USD]),
SUM('Funnel Data'[Opportunities Won Value USD]))))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

PshemekFLK_0-1616519430559.png

When I try to fix the brackets in this formula I still get 1.2 as Total not 2.7.

 

I see you've changed the first part of the formula. I thought it's the second DIVIDE part that produces a wrong result.

 

 

Can anyone give it a try? I still can't get to the right result

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.