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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Avivek
Post Partisan
Post Partisan

Calculated column for weighted average does not work for few rows

I had created a calculated column for total weight calculation which was (days difference* payment recieved). This calculated column works fine for few rows fetching the correct value on multiplication but few rows the multiplication values do not match. let me share the screenshot for it:

 

 

The calculated column is ,

Weight = RECEIVABLES[Days Diff]*RECEIVABLES[PAYMENT_AMOUNT]
 
Since it did not fetch the value I needed I created a new measure
Weight(measure)= CALCULATE(SUMX(RECEIVABLES,RECEIVABLES[Days Diff]*VALUE(sum(RECEIVABLES[PAYMENT_AMOUNT]))))
 
Though the measure works well but then the issue is that the total is not correct.
I need the total weight for another measure to fetch  me the weighted average days.
2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @Avivek ,

 

Can you share a screen shot or some sample data of your solution.

 

Try

Weight(measure)= SUMX(RECEIVABLES,RECEIVABLES[Days Diff]*RECEIVABLES[PAYMENT_AMOUNT]))

 

or 

Weight = SUMX( SUMMARIZE(Receivable, Receivable[Day Diff], Receivable[Payment_Amunt]), RECEIVABLES[Days Diff]*RECEIVABLES[PAYMENT_AMOUNT]))

 

Regards,

Harsh Nathani

amitchandak
Super User
Super User

@Avivek , try

Weight(measure)= CALCULATE(SUMX(RECEIVABLES,RECEIVABLES[Days Diff]*RECEIVABLES[PAYMENT_AMOUNT]))

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

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.