Forum Discussion
Richard_Lemkhar
3 years agoNew Member
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-RBRegular Visitor
try the COALESCE function to convert BLANK (empty) values in your measure to 0.
- Richard_LemkharNew Member
Thank you Amal. much appreciated
- Richard_LemkharNew Member
can you please show me how to do that ? no a big expert on Power BI
- Amal-RBRegular Visitor
Richard: it would be like this : COALESCE (CALCULATE(COUNTA('Run List'[ATDUsed]), 'Run List'[ATDUsed] = "YES" ), 0)
- parry2k
Super User
Richard_Lemkhar this:
Count of ATDUsed for YES = COALESCE ( CALCULATE(COUNTA('Run List'[ATDUsed]), 'Run List'[ATDUsed] IN { "YES" }), 0 )