Slice to be used to display columns based on two criteria

I want to create a slice that will be used to display column data based on two criteria from the following data:

ringAlertData.PNG

If I create a Slice using this data and expression, it works to display the start data column:

1) [extractTime] = [Start]

extractTimeStart.PNG

If I create a Slice using this data and expression, it works to display the End data column:

2) [extractTime] = [End]

extractTimeEnd.PNG

When I use either of these expressions individually, they work as expected. However, when I try to combine them together using this script, I don't get any results:

AND([extractTime] = [Start], [extractTime] = [End])

Any ideas as to how I can combine these two together?

 

Solved Solved
0 3 76
1 ACCEPTED SOLUTION

You might be using AND() where you should use OR(). 

Your current expression requires that the selected column has both conditions to be true:
1. [extractTime] = [Start], AND 2. [extractTime] = [END]

This means that for a row to match, its [Start] must be equal to [END]. I don't think this is the intended behavior. 

OR() | AppSheet Help Center

View solution in original post

3 REPLIES 3

You might be using AND() where you should use OR(). 

Your current expression requires that the selected column has both conditions to be true:
1. [extractTime] = [Start], AND 2. [extractTime] = [END]

This means that for a row to match, its [Start] must be equal to [END]. I don't think this is the intended behavior. 

OR() | AppSheet Help Center

Yes. OR() works! Thanks!

My logic was that if it is true for both [extractTime] = [Start], AND  [extractTime] = [END], then I would use an AND(). However, it appears I need to use the OR() instead.

This logic means [Start] = [END] ๐Ÿ™‚ 

By the way, in your case it would be more efficient to use IN() as:

IN([extractTime], LIST([Start], [END]))

IN() | AppSheet Help Center 

Top Labels in this Space