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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
PC2022
Helper II
Helper II

Calculating average between several columns

Trying to calculate the average number between 3 columns. I get an error "the count function only accepts a column reference as an argument"
 
ScheduleAvg = (AVERAGE(crb87_consultantevaluation[crb87_timelinessofprojectphasesubmittalsd]) + AVERAGE(crb87_consultantevaluation[crb87_timelysubmittalofprogressreportsandschedud]) + AVERAGE(crb87_consultantevaluation[crb87_timelinessofprojectphasedeliverablesandord])) / COUNT(crb87_consultantevaluation[crb87_timelinessofprojectphasesubmittalsd]) + COUNT(crb87_consultantevaluation[crb87_timelysubmittalofprogressreportsandschedud] + COUNT(crb87_consultantevaluation[crb87_timelinessofprojectphasedeliverablesandord]))
1 ACCEPTED SOLUTION
pankajnamekar25
Solution Sage
Solution Sage

Please try this

ScheduleAvg =
(
AVERAGE(crb87_consultantevaluation[crb87_timelinessofprojectphasesubmittalsd]) +
AVERAGE(crb87_consultantevaluation[crb87_timelysubmittalofprogressreportsandschedud]) +
AVERAGE(crb87_consultantevaluation[crb87_timelinessofprojectphasedeliverablesandord])
) / 3

View solution in original post

7 REPLIES 7
v-vpabbu
Community Support
Community Support

Hi @PC2022,

 

As suggested by the super user, please provide sample data that demonstrates your issue, along with the expected outcome. This will help us better understand the problem and provide the right guidance to resolve it.

 

Regards,

Vinay Pabbu

pankajnamekar25
Solution Sage
Solution Sage

Please try this

ScheduleAvg =
(
AVERAGE(crb87_consultantevaluation[crb87_timelinessofprojectphasesubmittalsd]) +
AVERAGE(crb87_consultantevaluation[crb87_timelysubmittalofprogressreportsandschedud]) +
AVERAGE(crb87_consultantevaluation[crb87_timelinessofprojectphasedeliverablesandord])
) / 3

This worked! Thank you!

Not working either

PC2022_0-1742928985363.png

 

techies
Solution Supplier
Solution Supplier

Hi @PC2022 please check this

 

ScheduleAvg =
AVERAGEX(
    crb87_consultantevaluation,
    VAR NonBlankCount =
        COUNT(crb87_consultantevaluation[Timeliness of Phase Submittals (A)]) +
        COUNT(crb87_consultantevaluation[Timeliness of Deliverables (C)]) +
        COUNT(crb87_consultantevaluation[Timely Submittal of Reports (B)])
   
    VAR TotalValue =
        crb87_consultantevaluation[Timeliness of Deliverables (C)] +
        crb87_consultantevaluation[Timeliness of Phase Submittals (A)] +
        crb87_consultantevaluation[Timely Submittal of Reports (B)]

    RETURN
        IF(NonBlankCount > 0, TotalValue / NonBlankCount, BLANK())
)

it is returning the same number for each project and phase

PC2022_0-1742848307482.png

 

lbendlin
Super User
Super User

Did you mean to use COUNTROWS() ?

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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