Forum Discussion
COUNTBLANK & IF
- 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
I don't think that worked unfortunately.
So basically if Column 5 = Available, then check if any of columns 1, 2, 3 are 0.
If they are then count that row.
Almost using a subset of the table where Column 5 = Available is the first filter to pass through.
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- nh272 years ago
Helper 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?