Forum Discussion
Kashuo
Helper I
9 years agoHow to filter a measure by multiple values
Hello, I would like to create a measure that returns the count of the rows of a table. I am able to use CALCULATE with a single value in the filter expression to get the measure to return the correct...
- 9 years ago
You can use double pipe || as a logical or
=CALCULATE([measure], table[column 1] = 1 || table[column 1] = 2)
- 9 years ago
Or is a function that takes 2 parameters. Double pipe || is an inline syntax and you can have as many as you need.
MattAllington
Community Champion
9 years agoYou can use double pipe || as a logical or
=CALCULATE([measure], table[column 1] = 1 || table[column 1] = 2)
v-alhans
8 years agoNew Member
When I use that formula, I get the error "The expression contains multiple columns, but only a single column ca be used in a True/False expression that is used as a table filter expression".
My measure is: COUNTA('table[Column])