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

Unique Average Calculation

Hi,

I have a table (attached) where I have some transactions duplicated....My chalenge is by power BI try to find the average ticket, but by function "AVG" or by "sum spent / sum transactions) is delivering wrong values....

Can you help me, please?

Many thanks in advance,

Rui

RMSLUIS_0-1709827951788.png

 

2 ACCEPTED SOLUTIONS

Anonymous
Not applicable

many thanks!!!😃

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

SUMMARIZE by transaction ID and then add MIN, MAX or AVERAGE  aggregation of Spent  (but not SUM)

Then COUNTROWS , SUMX and AVERAGEX the result.

Anonymous
Not applicable

Hi,

 

Thanks for your answer. Following this example, can you please help me to write the code (I'm a beginner in PBI 🙂 )

 

Thanks

Rui

lbendlin_0-1709857143280.png

 

Anonymous
Not applicable

many thanks!!!😃

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.