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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
markGti
Frequent Visitor

Help with Average Comparison

Hi All

 

SiteNameDistinct Count of ItemAverage Under/Over
A  
B1-95
C11-85
D7-89
E16872
F222126
G8-88
H  
I  
J  
K960
Sum of count distinct96 
Average73.29 

 

 

Trying to figure out how to calculate the Average Under/Over - need this to determine how far above/below the average each site is, and then use this for condtional fomartting.

 

Note: The disticnt count of items is calculated in the matrix, so not sure how to refrence that. Do I need to recalculate it?

I tried this
CALCULATE (
    AVERAGE (DISTINCTCOUNT( 'All Sites'[Item])),
    ALLSELECTED ()
)

 

but get the error: The AVERAGE function only accepts a column reference as an argument.

 

Can anyone point me in the right direction with the correct DAX formula?

 

Thanks

Mark

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @markGti 

 

I simulated the data, assuming [Distinct Count of Item] is a measure.

Measure:

Average = AVERAGEX(ALL('Table'),[Distinct Count of Item])

vzhangti_0-1663311668121.png

One question, isn't [Average Under/Over] a comparison of calculations to averages? Where did 96 come from?

Average Under/Over = IF([Distinct Count of Item]<>BLANK(),[Distinct Count of Item]-[Average])

vzhangti_1-1663311853107.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @markGti 

 

I simulated the data, assuming [Distinct Count of Item] is a measure.

Measure:

Average = AVERAGEX(ALL('Table'),[Distinct Count of Item])

vzhangti_0-1663311668121.png

One question, isn't [Average Under/Over] a comparison of calculations to averages? Where did 96 come from?

Average Under/Over = IF([Distinct Count of Item]<>BLANK(),[Distinct Count of Item]-[Average])

vzhangti_1-1663311853107.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

Hi

 

Thanks for reply

 

Yes that is the result expected. (6 is count distinct for Site K. THere is one slign complication, the Distint Count of Item is absed on a filter (flag = 1)

Hi, @markGti 

 

Has your problem been solved, if so, please consider Accept a correct reply as the solution to help others find it.

 

Best Regards

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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