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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Harishankar0592
Regular Visitor

Average Discrepancy AVERAGE X blanks/zero creating difference in the average.

Hello Friends,
Kindly find the below issue. I have an calculated column/Measure that returns below:

1 Count  2 Count   Average 1 Score    Average 2 Score
23   40     60
31   75     25
 2        100
11   50     50
14   20     80
5    100     0
22   50     50
31   75     25

 

If I take an average of column avg 2 score in excel using AVG(X:Y) its giving 48.7 and same numbers in PBI using AverageX its giving 45.16
I have tried using +0 at the end, ISBLANK, ect. Kindly help me in this regard

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Harishankar0592 

 

Thank you very much BeaBF for your prompt reply.

For your question, here is the method I provided:

 

Here's some dummy data

 

“Table”

vnuocmsft_0-1725949918728.png

 

Check null values: Make sure all null values are handled correctly. You can use the IF function to replace the null value with zero. Create a measure:

 

Average2Score = 
IF(
    ISBLANK(SELECTEDVALUE('Table'[Average 2 Score])),
    0,
    SELECTEDVALUE('Table'[Average 2 Score])
)

 

Use AVERAGEX to recalculate the average. Create a measure:

 

Average = 
AVERAGEX(
    'Table',
    'Table'[Average2Score]
)

 

Here is the result.

 

vnuocmsft_1-1725950138322.png

 

Or you can simply adjust the [Average 2 Score] column to average.

 

vnuocmsft_2-1725950403530.png

 

vnuocmsft_3-1725950448271.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

Harishankar0592
Regular Visitor

5 REPLIES 5
Harishankar0592
Regular Visitor

Thank You .... 

Anonymous
Not applicable

Hi @Harishankar0592 

 

Thank you very much BeaBF for your prompt reply.

For your question, here is the method I provided:

 

Here's some dummy data

 

“Table”

vnuocmsft_0-1725949918728.png

 

Check null values: Make sure all null values are handled correctly. You can use the IF function to replace the null value with zero. Create a measure:

 

Average2Score = 
IF(
    ISBLANK(SELECTEDVALUE('Table'[Average 2 Score])),
    0,
    SELECTEDVALUE('Table'[Average 2 Score])
)

 

Use AVERAGEX to recalculate the average. Create a measure:

 

Average = 
AVERAGEX(
    'Table',
    'Table'[Average2Score]
)

 

Here is the result.

 

vnuocmsft_1-1725950138322.png

 

Or you can simply adjust the [Average 2 Score] column to average.

 

vnuocmsft_2-1725950403530.png

 

vnuocmsft_3-1725950448271.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

BeaBF
Super User
Super User

@Harishankar0592 can you paste your current formula? and explain better the problem? 

I'm here:

BeaBF_0-1725866272256.png

 

 

BBF

On finding the average of Average 2 Score ? Average Pos Score  in excel = AVG(60,25,100,50,80,0,50,25) is 48.7 %. If I use same average of Average 2 Score 60,25,100,50,80,0,50,25 I ended up with 45.16%. I dont know why 2 different answers for same set of numbers.

Hello @BeaBF 
Thank you for your response.
Kindly find the below 

Pos Count =
CALCULATE(
    COUNTROWS(
        FILTER(
            'Query1',
            'Query1'[Is Question] = 1 &&
            'Query1'[Resp] = "Positive"
Formula 2:
Average Pos Score =
COALESCE(
    IF(
        ISBLANK(SUMX(VALUES(Query1[Name]), [Pos Count])) ||
        ISBLANK(SUMX(VALUES(Query1[Name]), [Pos Count] + [Neg Count])),
        0,
        DIVIDE(
            SUMX(VALUES(Query1[Name]), [Pos Count]),
            SUMX(VALUES(Query1[Name]), [Pos Count] + [Neg Count]),
            0
        ) * 100
    ),
    0
)


Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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