Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
I have a set of data and would like to calculate the average of the unqiue
The raw data set is as below:
| GUID | Type | Score |
| 1 | a | 90 |
| 1 | a | 90 |
| 1 | a | null |
| 1 | b | 100 |
| 2 | a | 100 |
| 2 | a | null |
| 2 | b | 95 |
| 3 | a | 50 |
| 3 | a | 50 |
| 3 | a | 50 |
I would like to make it Becoming these:
| GUID | Type | Score |
| 1 | a | 90 |
| 2 | a | 100 |
| 3 | a | 50 |
Hence Average for Type a is (90+100+50)/3 = 46.67
and for Type b
| GUID | Type | Score |
| 1 | b | 100 |
| 2 | b | 95 |
The average is (100+95)/2 = 97.5
I've tried a few measures but it seems to take account for the duplication including
Solved! Go to Solution.
Hi @jinweitan ,
Based on my test, it is suggested to create a calculated table.
Table 2 =
DISTINCT (
SELECTCOLUMNS (
'Table',
"GUID", [GUID],
"Type", [Type],
"Score",
CALCULATE (
MAX ( 'Table'[Score] ),
ALLEXCEPT ( 'Table', 'Table'[GUID], 'Table'[Type] )
)
)
)
Create a measure.
MaxScore =
IF (
HASONEVALUE ( 'Table 2'[GUID] ),
SUM ( 'Table 2'[Score] ),
AVERAGE ( 'Table 2'[Score] )
)
The result is this. Change the name of Total to Average.
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jinweitan ,
Based on my test, it is suggested to create a calculated table.
Table 2 =
DISTINCT (
SELECTCOLUMNS (
'Table',
"GUID", [GUID],
"Type", [Type],
"Score",
CALCULATE (
MAX ( 'Table'[Score] ),
ALLEXCEPT ( 'Table', 'Table'[GUID], 'Table'[Type] )
)
)
)
Create a measure.
MaxScore =
IF (
HASONEVALUE ( 'Table 2'[GUID] ),
SUM ( 'Table 2'[Score] ),
AVERAGE ( 'Table 2'[Score] )
)
The result is this. Change the name of Total to Average.
You can check more details from here.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@jinweitan , Try like
Measure = AVERAGEX(SUMMARIZE ('Table 1'[GUID],'Table 1'[Score]),[score])
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!