Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Count if and Sum by Group

Hello there, I want to do something that seems simple, but I just can't figure it out.  I want to count instances where a value is >= 90% and also separately count values that are below that I hav...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

    You can create the following 2 measures for calculating the counts of instances( >= 90%) and instances( < 90%) separately, and put them on Values tab of matrix:

    Pass =

    CALCULATE (

        COUNTROWS ( 'Production' ),

        FILTER ( 'Production', 'Production'[Production%] >= 0.9 )

    )

     

    Fail =

    CALCULATE (

        COUNTROWS ( 'Production' ),

        FILTER ( 'Production', 'Production'[Production%] < 0.9 )

    )

    Best Regards

    Rena