Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Count If

Hi everyone.

I'm want calculate like count if excel in power BI, but my sentence is not ok. I'm try create another measure, but this count all register for each operator.

 

MeasureCountIf =
CALCULATE (
COUNTROWS ( Table );
FILTER ( Table; Table[Operator] = Table[Operator] );
FILTER ( Table; Table[Serial Number] = Table[Serial Number] )
)

 

Thanks for help.

 

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anyone could help me :smileyfrustrated:

  • v-cherch-msft's avatar
    v-cherch-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Anonymous

     

    To get the table as requested, you may try 2 ways:
    1. Create a measure:

    Measure :=
    CALCULATE(COUNTROWS('Table'))


    2. Create a column:

    Column =
    COUNTX (
        FILTER ( 'Table', 'Table'[Serial Number] = EARLIER ( 'Table'[Serial Number] ) ),
        'Table'[Serial Number]
    )


    Regards,
    Cherie

    • Anonymous's avatar
      Anonymous
      Not applicable

      v-cherch-msft

       

      Thanks for your support, but not solve.

      • v-cherch-msft's avatar
        v-cherch-msft
        Icon for Microsoft Employee rankMicrosoft Employee

        Anonymous

         

        You may post what result you want or what trouble you meet.

         

        Regards,

        Cherie