Forum Discussion

Richard_Lemkhar's avatar
Richard_Lemkhar
New Member
3 years ago
Solved

Calculate YES and avoid BLANK in a widget

Hello

 

I am trying to calculate the number of YES in a column using the below formulas

 

Count of ATDUsed for YES =
CALCULATE(COUNTA('Run List'[ATDUsed]), 'Run List'[ATDUsed] IN { "YES" })
 
but when there is no YES the widget is showing BLANK where i wants 0
 
Can you please help
  • try the COALESCE function to convert BLANK (empty) values in your measure to 0.

5 Replies

  • Amal-RB's avatar
    Amal-RB
    Regular Visitor

    try the COALESCE function to convert BLANK (empty) values in your measure to 0.

    • Amal-RB's avatar
      Amal-RB
      Regular Visitor

      Richard: it would be like this : COALESCE (CALCULATE(COUNTA('Run List'[ATDUsed]), 'Run List'[ATDUsed] = "YES" ),  0)

  • Richard_Lemkhar this:

     

     

    Count of ATDUsed for YES =
    COALESCE (
    CALCULATE(COUNTA('Run List'[ATDUsed]), 'Run List'[ATDUsed] IN { "YES" }),
    0
    )