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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
th340385
Helper I
Helper I

Weighted Average Interest Rate (by Seller) DAX Formula

Hello,

 

I am trying to figure out the DAX formula (or best approach) to calculate the weighted average interest rate by loan seller with the ability to add a slicer / filter on vintage. Please let me know if you need any additional details. 

 

weighted avg example.PNG

 

Thank you!

 

 

1 ACCEPTED SOLUTION

@th340385used a matrix viz and all my calculations are measures and not calculated column.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

6 REPLIES 6
smpa01
Super User
Super User

@th340385I did it in this way. Hopefully this is what you are looking for.

 

Total Balance = SUMX('Table (2)','Table (2)'[Balance])
BalancexRate = SUMX('Table (2)','Table (2)'[Balance]*'Table (2)'[Rate])
WEGH_Avg_INT% = [BalancexRate]/[Total Balance]

xt.PNG

xt.PNG

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

@smpa01 Thank you for the reply. The formulas provide for each column make sense; however, how did you initially summarize the data by the Loan Seller Column?

@smpa01 Actually, I believe you used a matrix visualization, correct?

@th340385used a matrix viz and all my calculations are measures and not calculated column.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
amitchandak
Super User
Super User

If it is dependent on Loan Bal. Approach could be

Col = Loan Bal * Int. rate 

Weighted Avg = Sum(Col)/Sum(Loan bal)

 

Thanks for this! This was the first simplistic option I had come across and it worked perfectly

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.