Forum Discussion

jonbox's avatar
jonbox
Icon for Helper II rankHelper II
4 years ago
Solved

Help on preventing count on a blank cell

Hi, I currently have the below metric which counts the number of rows containing 1 and shows as a percentage, e.g. if there are 31 rows and 16 contain 1, the measure will count that there are 31 and ...
  • amitchandak's avatar
    4 years ago

    jonbox , try a measure like

     


    Dec % Per Dpt =
    DIVIDE(
    CALCULATE( COUNTROWS('Dept Scorecard 2122'), 'Dept Scorecard 2122'[Dec_6] = 1 ),
    CALCULATE( COUNTROWS('Dept Scorecard 2122'), Filter(ALL('Dept Scorecard 2122'[Dec_6] ), not(isblank('Dept Scorecard 2122'[Dec_6]))
    )))