Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

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

 

4 Replies

  • 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's avatar
      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