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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

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, we have 34 rows of loans, but only 30 unique Customer ID's in those 34 loans.

 

2) We copy and paste this same section (basically duplicating it) and change the visualization to a 'Card' We then display the Loan Amount on that card, and change the property from 'Sum' to 'Average'. It now displays the average amount per Customer. But what we want it the average amount per loan. Since there are less customers than loans, the average amount displayed is too high.

 

How do we fix that? How do we get an average per loan?

 

 

1 ACCEPTED SOLUTION
waltheed
Impactful Individual
Impactful Individual

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.

Cheers, Edgar Walther
ITsmart BI and Analytics consultant

View solution in original post

2 REPLIES 2
waltheed
Impactful Individual
Impactful Individual

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.

Cheers, Edgar Walther
ITsmart BI and Analytics consultant
Anonymous
Not applicable

Thanks !!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.