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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
enterprised1
Helper I
Helper I

Calculate average of only unique records

Hello,

 

I'm working off an Excel spreadsheet linked to Power BI and I'm trying to find the average income of just unique Families.  

 

For example, in the sample below, using the Average option in any PowerBI value field results in the average of all rows, in this case, 50,631.25 since a single family is listed multiple times (depending on their household size).  I'm trying to get the value listed under the 'UniqueAVG' column, 52,060 - the true average income for families in the sample.

 

1.PNG

 

Is there a way to accomplish this either within PowerBI or from Excel?

 

Thanks!

2 REPLIES 2
v-sihou-msft
Employee
Employee

@enterprised1

 

In this scenario, you just need to use SUMMARIZE() function to create a calculated table to have records group on FamilyId.

 

Table = SUMMARIZE(Family,Family[FamId],Family[HHSize],Family[Income])

77.PNG

 

 

Regards,

I've been playing with this for a few days and still can't figure out where to use the Summarize() function.  Do I add it to the Data Model window in Excel?  Is there someplace in PowerBI where I should be entering it?  

 

I'm sure it's a simple thing to do but I'm still new at this and I'm completely lost... Smiley Very Happy

 

Thanks!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors