cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Microsoft
Microsoft

Re: Calculate average of only unique records

@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,

Highlighted
Frequent Visitor

Re: Calculate average of only unique records

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors