Forum Discussion

jl20's avatar
jl20
Helper IV
9 years ago
Solved

Calculated Column akin to COUNTIF

Hi,   I am trying to figure out a formula for a calculated column that will count the number of instances of a MatterID number (i.e., the red text in the screenshot below). Every "D" is on the tabl...
  • OwenAuger's avatar
    OwenAuger
    9 years ago

    To handle that, just wrap the original measure in an IF ISBLANK test:

     

    =
    IF (
        ISBLANK ( YourTable[MatterID] ),
        0,
        CALCULATE (
            COUNTROWS ( YourTable ),
            ALLEXCEPT ( YourTable, YourTable[MatterID] )
        )
    )