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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.