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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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]))))

@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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors