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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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 | DP-700 Certified

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.