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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PC2022
Helper III
Helper III

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
Super User
Super User

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
Anonymous
Not applicable

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
Super User
Super User

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
Super User
Super User

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())
)
― Power BI | Microsoft Fabric | PL-300 | DP-600 | Blog: medium.com/@cseprs_54978

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.