Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How to include zero values in calculations

Hi, I'm trying to calculate a weighed average in Power BI. To calculate the weighed average I require to divide a number through the SUM of weight. The table has some 0 values on the amounts and so w...
  • v-danhe-msft's avatar
    7 years ago

    Hi Anonymous ,

    Based on my test, you could refer to below formula:

    CALCULATE(SUM('Table1'[percentage_weight]),FILTER('Table1','Table1'[Percentage_score]<>0))

    Result:

     

    Regards,

    Daniel He