Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

AverageX not consider 0 values

I need than this measure ignores zeros in the calculation: 

Promedio elasticidad Pbi MEJORADO = AVERAGEX(Filter( VALUES(Combinar1[Numero semana]) , [Filter Elasticidades Grandes] = "Si considerar" && [Elasticidad] <> 0 ) ,[Elasticidad]). 

Elasticidad is a measure, Filter Elasticidades Grandes is a measure too. 

 

amitchandak 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    i was able to exlude values of "elasticidad" when elasticidad is bigger than 100 in absolute value (creating a slicer to slice my "Elasticidad" measure using variables. but now i dont know how to deal with zeros in the calculation of my average.

    • Anonymous's avatar
      Anonymous
      Not applicable

      bigger than 10**

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Please modify the formula.

    Promedio elasticidad Pbi MEJORADO =
    AVERAGEX (
        FILTER (
            ALL ( tablename ),
            [Filter Elasticidades Grandes] = "Si considerar"
                && [Elasticidad] <> 0
        ),
        [Elasticidad]
    )
    
    

     

    If I have misunderstood your meaning, please provide screenshoots with some sample data and your desired output.

     

    Best Regards

    Community Support Team _ Polly

     

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