Forum Discussion

Naveennegi119's avatar
Naveennegi119
Helper III
8 years ago
Solved

Count by Criteria

Hi All,

 

 

need help in count in criteria:-

 

<30

>=30 &<70

>=70

 

SubNo.      
A20  Count by criteria   
A29  Sub<30>=30 & <70>=70
A31  A253
A35  B433
A55      
A80      
A85      
A75      
A45      
A40      
B10      
B15      
B17      
B28      
B40      
B45      
B56      
B80      
B91      
B78      

 

It's easy in excel but in power BI i can't figure out this.

 

Best regards,

NICK

  • Naveennegi119 

     

    Measure > 30 = CALCULATE(COUNTROWS(Table2),Table2[No.] < 30)

    Measure 30&70 = CALCULATE(COUNTROWS(Table2),Table2[No.] >= 30, Table2[No.] < 70)

    Measure70 = CALCULATE(COUNTROWS(Table2),Table2[No.] >=70)

     

    that should give you the idea

    and gives this result

     

     

     

     

7 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    Naveennegi119 

     

    Measure > 30 = CALCULATE(COUNTROWS(Table2),Table2[No.] < 30)

    Measure 30&70 = CALCULATE(COUNTROWS(Table2),Table2[No.] >= 30, Table2[No.] < 70)

    Measure70 = CALCULATE(COUNTROWS(Table2),Table2[No.] >=70)

     

    that should give you the idea

    and gives this result

     

     

     

     

      • Naveennegi119's avatar
        Naveennegi119
        Helper III

        Hi vanessafvg

         

        Can it possible if criteria range is not filfull condition.

         

        it show 0 instead of blank

         

        SubCount<30>=30 - <70>=70
        A105 5
        B10532

         

        See in A >=30 - <70 catagory

         

        Regards,

        NICK