Forum Discussion

Harishankar0592's avatar
Harishankar0592
Regular Visitor
2 years ago
Solved

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 2 3    40      60 3 ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    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”

     

    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.

     

     

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

     

     

     

    Regards,

    Nono Chen

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