cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jeffreykeryk
Helper I
Helper I

Average Calculation by distinct count

Average = Sum / Count

 

For a pivot visualization, can I extend the Values summerization to Average = Sum / Distinct Count?

 

Thanks in advance!

 

Jeff Keryk

1 ACCEPTED SOLUTION

yes, just write a custom measure as follows

 

myAverage = divide(sum(table[Column]),distinctcount(table[Column]))



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

2 REPLIES 2

yes, just write a custom measure as follows

 

myAverage = divide(sum(table[Column]),distinctcount(table[Column]))



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Hey Matt - It's funny... I have been doing DAX measures in Power Pivot for some time. With PBI, I am working with a new tool and I seem to forget what I already know!

 

Thanks for your help; it was perfect.

Jeff Keryk

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors