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 of distinct count

I need a measure to calculate the average (distinct count of) tickets per site code as per visual below. I tried averagex, averagea but with incorrect results. Any tips please @tamerj1 ?

Screenshot 2022-05-09 231627.png

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Avg tickets =
var summaryTable = ADDCOLUMNS( VALUES( 'Table'[SITE_CODE]), "@val", [Distinct total tickets])
return AVERAGEX( summaryTable, [@val])

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Avg tickets =
var summaryTable = ADDCOLUMNS( VALUES( 'Table'[SITE_CODE]), "@val", [Distinct total tickets])
return AVERAGEX( summaryTable, [@val])
Anonymous
Not applicable

@johnt75 thank you for the prompt response, results look much better. Appreciate your help.

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.