Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

Average for multiple rows for same customer

1) We have a file with loans per customer. We are displaying this file in a table visualization. It shows:   Customer Name, Customer Unique ID, Loan Amount.   Since some customers have 2 loans, w...
  • waltheed's avatar
    10 years ago

    Hi broekman,

     

    You will need to add some calculated measures to your data model.

    Like these:

     

    Count of Loans:=COUNTROWS('LoanTable')

    Count of Customers:=DISTINCTCOUNT([Customer ID])

    Avg by Loan:=AVERAGE([Loan Amount])

    Avg by Cust:=DIVIDE(SUM([Loan Amount]); [Count of Customers]; BLANK())

     

    These will give you the right numbers.