Forum Discussion
MC777
3 years agoNew Member
At least one value marks all values
I need help.
I currently have this kind of data (green cells). I would need to add a new column that would contain the value "yes" if there is at least one "yes" for a given order.
I hope you understand me.
How can I do that?
MC
try to write like this
Column = VAR _order = 'Table'[order] VAR _RESULT = CALCULATE ( COUNTROWS (), FILTER (ALL ( 'Table' ), 'Table'[order] = _order && 'Table'[something] = "yes") ) RETURN IF ( _RESULT = 1, "YES", "NO" )
1 Reply
- Ahmedx
Super User
try to write like this
Column = VAR _order = 'Table'[order] VAR _RESULT = CALCULATE ( COUNTROWS (), FILTER (ALL ( 'Table' ), 'Table'[order] = _order && 'Table'[something] = "yes") ) RETURN IF ( _RESULT = 1, "YES", "NO" )