Forum Discussion

Edmundas's avatar
Edmundas
Frequent Visitor
3 years ago
Solved

Simple countif

Hi everyone,

 

I'm quite new on Power BI. Could you please help me to write formula in Power BI column (COUNTIF formula in picture below). Thank you in advance.

 

  • Edmundas Hi!

     

    = CONTAINS('Table','Table'[Random names], 'Table'[Employee]) + 0
     
    BBF
  • Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a new column.

     

     

     

    Expected result CC =
    COUNTROWS (
        SUMMARIZE (
            FILTER (
                Data,
                Data[Employee] = EARLIER ( Data[Employee] )
                    && Data[Employee] IN DISTINCT ( Data[Random name] )
            ),
            Data[Employee]
        )
    ) + 0
    

     

4 Replies

    • BeaBF's avatar
      BeaBF
      Super User

      Edmundas However, I advise you to adopt mine, as it is computationally lighter.

       

      BBF

  • Edmundas Hi!

     

    = CONTAINS('Table','Table'[Random names], 'Table'[Employee]) + 0
     
    BBF
  • Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a new column.

     

     

     

    Expected result CC =
    COUNTROWS (
        SUMMARIZE (
            FILTER (
                Data,
                Data[Employee] = EARLIER ( Data[Employee] )
                    && Data[Employee] IN DISTINCT ( Data[Random name] )
            ),
            Data[Employee]
        )
    ) + 0