Forum Discussion

jeffreykeryk's avatar
jeffreykeryk
Helper I
10 years ago
Solved

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

  • yes, just write a custom measure as follows

     

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

2 Replies

  • MattAllington's avatar
    MattAllington
    Community Champion

    yes, just write a custom measure as follows

     

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

    • jeffreykeryk's avatar
      jeffreykeryk
      Helper I

      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