Forum Discussion
How to filter a measure by multiple values
- 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.
Hello Matt,
Is there a way to use the || to sort byt two columns?
I have a total ranking of mutiple columns columns. However, I also have a column with the number of surveys the customer took. I need to rank all customers with more than 10 surveys in the upper half of my table but then I also need to rank those with less than 10 surveys in the lower half of the table. Any suggestion on how to do that?
Thank you,
Lukas
I'm not clear on what you mean by "rank". If you need to filter a table based on the values in 2 different columns
eg table[Col1] >=10 or table[Col2] <=10 then I would normally do this as follows
UNION(
filter(table,table[col1]>=10),
filter(table,table[col2]<=10)
)