Forum Discussion

Oros's avatar
Oros
Post Prodigy
2 years ago
Solved

COUNT negative values

Hello,
 
I have a measure (VARIANCE) that is the difference between 2 columns.
 
VARIANCE column has negative and positive values.
 
How do I COUNT how many values fall lower than negative 5?
 
Thanks.
 
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  Oros ,

     

     

    Here are the steps you can follow:

    1. Create measure.

    Measure =
    COUNTX(
        FILTER(ALL('Table'),[VARIANCE]<-5),[Value1])

    2. Result:

    Best Regards,

    Liu Yang

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

  • Hi Oros ,
    Please can create a measure using any of these calculation :-

    Measure = CALCULATE(COUNT(Table1[Data]),[Variance]< -5 )

     

    Measure = COUNTX(
        FILTER(ALL('Table1'),[Variance]<-5),[Value])

     

     

    Thanks ,
    Pratyasha Samal 
    Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
    If you found this post helpful, please give Kudos C

3 Replies

  • Hi Oros ,
    Please can create a measure using any of these calculation :-

    Measure = CALCULATE(COUNT(Table1[Data]),[Variance]< -5 )

     

    Measure = COUNTX(
        FILTER(ALL('Table1'),[Variance]<-5),[Value])

     

     

    Thanks ,
    Pratyasha Samal 
    Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
    If you found this post helpful, please give Kudos C

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Oros ,

     

     

    Here are the steps you can follow:

    1. Create measure.

    Measure =
    COUNTX(
        FILTER(ALL('Table'),[VARIANCE]<-5),[Value1])

    2. Result:

    Best Regards,

    Liu Yang

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

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    maybe like this?

     

    count negative values =
    CALCULATE ( COUNTROWS ( tablename ), variance < -5 )

     

    easier when sample data is supplied, if that doesn't work please provide some sample data.