Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

average of column values depending upon the duplicate entries in another column

Hi All,

 

need some help on calculating avg of values depending upon duplicates in another 2 columns

 

i have a table fetched via api . now the table has multiple columns 

i am trying to create a measure/column that can remove the duplicacy and generate avg so that overall rows can be reduced.

 

for example -

Column 1   Column 2  Column3

A                CT               0.22

A                CT                0.34

B                CT               0.23

B               TR                0.11

B                TR                0.14

C              ED                0.25

C              TR                0.14

 

im looking for below output

Column1  Column2   Column2 

A                CT         avg of(0.22,0.34)

B                 CT        0.23

B                TR       avg of(0.11,0.14)

and so on

1 ACCEPTED SOLUTION
v-xulin-mstf
Community Support
Community Support

Hi @Anonymous,

 

Try measure as:

Measure =

CALCULATE(

   AVERAGE('Table'[Column3]),

   FILTER(

       ALL('Table'),

       'Table'[Column2]=MAX('Table'[Column2])&& 'Table'[Column1]=MAX('Table'[Column1])

   )

)

 Here is the output:

v-xulin-mstf_0-1611911727990.png

 

Here is the demo, please try it: average of column values depending upon the duplicate entries in another column

 

Best Regards

Link

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xulin-mstf
Community Support
Community Support

Hi @Anonymous,

 

Try measure as:

Measure =

CALCULATE(

   AVERAGE('Table'[Column3]),

   FILTER(

       ALL('Table'),

       'Table'[Column2]=MAX('Table'[Column2])&& 'Table'[Column1]=MAX('Table'[Column1])

   )

)

 Here is the output:

v-xulin-mstf_0-1611911727990.png

 

Here is the demo, please try it: average of column values depending upon the duplicate entries in another column

 

Best Regards

Link

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Kudoed Authors