Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
What is the best way to calculate average score in this scenario? I want to calculate the average by supplier so for
supplier A: (15+30) / 2 = 22.5
supplier B: (15+45) / 2 = 30
Sample data:
Supplier | Study number | Score |
Supplier A | 001 | 15 |
Supplier A | 002 | 30 |
Supplier B | 001 | 15 |
Supplier B | 003 | 45 |
Supplier C | 004 | 15 |
Supplier C | 005 | 30 |
Supplier D | 002 | 30 |
Supplier | Average score |
Supplier A | 22.5 |
Supplier B | 30 |
Supplier C | 22.5 |
Supplier D | 30 |
@jeanramonyap , I think your requirement is too hard for me, I might be incompetent for resolving your problem. I kindly requested you to raise new ticket to get your solution from other mighty community members.
I'm sorry.
Thanks for your relpy but it's giving me the wrong values. I was thinking more of a calculated column.
@jeanramonyap try this calculated column
Average = var _sum = CALCULATE(SUM('Table'[Score]),ALL('Table'),'Table'[Supplier] = EARLIER('Table'[Supplier]))
var _count = CALCULATE(COUNT('Table'[Supplier]),ALL('Table'),'Table'[Supplier] = EARLIER('Table'[Supplier]))
return
_sum / _count
Tried it but since there are multiple Suppliers, it's not possible to use EARLIER here
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |