Forum Discussion
nh27
2 years agoHelper III
COUNTBLANK & IF
I am trying to return a string that says "Not Blank" or "Blank" if all 3 columns I have in a table are ALL blank, but I'm hitting a bit of a roadblock trying to use an IF statement with COUNTBLANK. ...
- 2 years ago
Hmm. That's what I wrote should do. (Note that it won't work as expected if any parentheses are removed.)
You can do it in multiple steps if you prefer though:
AvailableRowsWithBlankOrZero = VAR _AvailableRows_ = FILTER ( 'TableA', 'TableA'[Column5] = "Available" ) VAR _NonZeroRows_ = FILTER ( _AvailableRows_, 'TableA'[Column1] = 0 || 'TableA'[Column2] = 0 || 'TableA'[Column3] = 0 ) VAR _Count = COUNTROWS ( _NonZeroRows_ ) RETURN _Count
AlexisOlson
2 years agoSuper User
Hmm. That's what I wrote should do. (Note that it won't work as expected if any parentheses are removed.)
You can do it in multiple steps if you prefer though:
AvailableRowsWithBlankOrZero =
VAR _AvailableRows_ =
FILTER (
'TableA',
'TableA'[Column5] = "Available"
)
VAR _NonZeroRows_ =
FILTER (
_AvailableRows_,
'TableA'[Column1] = 0 ||
'TableA'[Column2] = 0 ||
'TableA'[Column3] = 0
)
VAR _Count =
COUNTROWS ( _NonZeroRows_ )
RETURN
_Countnh27
2 years agoHelper III
Hi, sorry me again.
I am trying to use this logic for columns where I have narrative text, however this time I want to count the number of rows where either of column 1 2 or 3 are blank based on the filter of column5. I've tried using = BLANK but it doesn't seem to return any count.
Any ideas?