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

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.

Reply
RustyNails
Helper III
Helper III

Averaging for Unique/Distinct values only

Hello, I have a fairly simple problem but can't seem to work my way around it.

 

I have an Product table, and I want to uniquely average it's rating across the table. What I mean is that if a rating repeats for different markets or departments, it should not impact it's overall rating. Business reason is that the product's review is not based on it's market performance. So a product for example could theoretically repeat itself (and it's rating) for all 50 states with one department. But for another department, it could be only one record. Yet we want the average to be based on the distinct rating, regardless of who reviewed it and howmany times its repeating. Market column is simply there to show that the product is available. Here's what the Data looks like (below). MyAverage is obviously incorrect. I want it to match Expected Average.

 

image.png

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

HI @RustyNails

 

Try this MEASURE

 

Measure =
AVERAGEX (
    SUMMARIZE ( Table1, Table1[Product Name], Table1[Rating] ),
    CALCULATE ( VALUES ( Table1[Rating] ) )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

HI @RustyNails

 

Try this MEASURE

 

Measure =
AVERAGEX (
    SUMMARIZE ( Table1, Table1[Product Name], Table1[Rating] ),
    CALCULATE ( VALUES ( Table1[Rating] ) )
)

Regards
Zubair

Please try my custom visuals

Worked. Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.