Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

DAX Formula

I am having a hard time figuring out how to write a countif formula in DAX.   =countif(table a, "Yes")/countif(tableb,Total)   so basically a % formula.. can anyone assist?
  • parry2k's avatar
    7 years ago

    Anonymous try this, add following as a measure

     

    My Measure =
    DIVIDE
    (
    CALCULATE( COUNTROWS( TableA ), TableA[Column] = "Yes" ),
    CALCULATE( COUNTROWS( TableB ), TableB[Column] = "Total" )
    )