Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Count Text Values, but return ) not (Blank) - Power BI

Hi Folks

I created a measure to count how many Overdue projects appear in a list

Overdue Count = CALCULATE( COUNTROWS( 'Project Overview'), 'Project Overview'[Overdue Flag] = "Overdue")

I created the Overdue flag in the source table first, so line by line there is either Overdue / Near Due or blank cells

Where a Project Manager has no Overdue projects, the Measure returns (Blank) (in my card visual)


Does anyone have any tips for telling the measure to return Zero instead?



  • Wrap your function with COALESCE.

    So COALESCE([Your Measure], 0)

    COALESCE returns the first non-blank value, so if Your Measure is blank, it will default to the 0.

2 Replies

  • edhans's avatar
    edhans
    Community Champion

    Wrap your function with COALESCE.

    So COALESCE([Your Measure], 0)

    COALESCE returns the first non-blank value, so if Your Measure is blank, it will default to the 0.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Perfect Solution



    Thank You!