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 ...
  • Chakravarthy's avatar
    2 years ago

    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')