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.

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 @Anonymous ,

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

Anonymous
Not applicable

thanks so much