cancel
Showing results for 
Search instead for 
Did you mean: 

Average is not returning a value

 

Hi all,

 

I need help please my average calculation of average of quote amount by contractors is bringing this error message  

 
 

 

 

Calculation error in measure cannot convert value (Contractor) of type text to type True/False.

 

 

my measure is

Average = CALCULATE(AVERAGEX(FILTER('All Outstanding Current Works','All Outstanding Current Works'[Quote Amount]<>0),'All Outstanding Current Works'[Quote Amount]),'All Outstanding Current Works'[Contractor])
Status: New
Comments
v-yingjl
Community Support

Hi @YvesHermann ,

Please try to modify your measure like this:

Average = 
AVERAGEX(
    FILTER(
        'All Outstanding Current Works',
        'All Outstanding Current Works'[Quote Amount] <> 0 &&
        'All Outstanding Current Works'[Contractor] in DISTINCT('All Outstanding Current Works'[Contractor])
    ),
    'All Outstanding Current Works'[Quote Amount]
)

It should get the average result.

 

Best Regards,
Community Support Team _ Yingjie Li

YvesHermann
Regular Visitor

thanks so much