Forum Discussion

Catman's avatar
Catman
Frequent Visitor
1 year ago
Solved

Calculating Weighted Average

I would like to calculate the weighted average value for each customer like below: I need to calculate the Total Amount by customer and the weight %, then I can multiply by the Payment Days to obtai...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Catman ,
    Thank you for sharing the update!
    It might happening because the total amount by customer is being calculated at the invoice level instead of staying fixed for the customer. This happens when the visual includes invoice-level detail, and the measure does not ignore that context. To get the right weight % and average payment days, the total amount should remain the same across all invoices for a customer. Also, since your Customer and Invoice tables are separate, just make sure there is a proper relationship between them.
    Hope this helps.
    Thank you.