Can I make a CountIf statement use an “or” in the boolean logic? The function arguments use “and” between the conditions, but I would like to use “or.”
You can use an OR like so:
CountIf([Status] = "comped" OR [Status] = "paid")
Similarly, you can use a conjunction of AND and OR anywhere you use boolean logic:
If(([State] = "CA" OR [State] = "NY") AND [Status] = "paid", "A", "B")
Hey Sierra. Just curious, is there any useable IN() syntax for long lists?
Such as: CountIf([Status] IN(“comped”,“paid”,“draft”) )
Or is the only method to use repeated OR statements?
We have the two functions that may suit your needs, but I think
In will be best:
CountIf( In([Status],“comped”,“paid”,“draft”) )
ArrayContains could work if your list of desired values is the contents of a column
Also, welcome to the Sigma Community!