Forum Discussion

th340385's avatar
th340385
Icon for Helper I rankHelper I
7 years ago
Solved

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. 

 

 

Thank you!

 

 

  • smpa01's avatar
    smpa01
    7 years ago

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

6 Replies

  • smpa01's avatar
    smpa01
    Icon for Community Champion rankCommunity Champion

    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]

     

    • th340385's avatar
      th340385
      Icon for Helper I rankHelper I

      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?

      • th340385's avatar
        th340385
        Icon for Helper I rankHelper I

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

  • If it is dependent on Loan Bal. Approach could be

    Col = Loan Bal * Int. rate 
    
    Weighted Avg = Sum(Col)/Sum(Loan bal)

     

    • JasonSchmidt's avatar
      JasonSchmidt
      New Member

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