Forum Discussion

DazzaRCIB's avatar
DazzaRCIB
Regular Visitor
2 years ago
Solved

Excel Calculation in Power bi

Morning,

 

I'm trying to recreate a calulation from excel into Power bi but with no luck so far:

On a calulated column I want to count how many times a number occurs? Any help would be great.

  • Hi DazzaRCIB 

    Please try giving the below code

    COUNTIF =
    COUNTROWS(
        FILTER(Table,Table[Column]=EARLIER(Table[Column]))
    )
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Chakravarthy ,thanks for the quick reply, I'll add further.

    Hi DazzaRCIB ,

    The Table data is shown below:

    Use the following DAX expression to create a measure

     

    Count = COUNTROWS('Table')

     

     

3 Replies

  • Hi DazzaRCIB 

    Please try giving the below code

    COUNTIF =
    COUNTROWS(
        FILTER(Table,Table[Column]=EARLIER(Table[Column]))
    )
    • DazzaRCIB's avatar
      DazzaRCIB
      Regular Visitor

      This would work as a column but I need it as a measure?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Chakravarthy ,thanks for the quick reply, I'll add further.

    Hi DazzaRCIB ,

    The Table data is shown below:

    Use the following DAX expression to create a measure

     

    Count = COUNTROWS('Table')