Filter data

Hi community…

I tried to create view in my app to extract records values for all users according to date, so I created slice to include this data and write this expression
2X_c_c43a2d8df743829b7cb392fe27bb4f2f7a57bb7a.png
in slice as shown:

Thank you in advance.

Solved Solved
0 10 258
1 ACCEPTED SOLUTION

You’re getting an error because like I said, the FILTER part of the expression is built into the Slice functionality. The expression for a slice must return a TRUE or FALSE result. The FILTER expression returns a LIST from a table based off the provided condition.

Therefore, you cannot use FILTER in a Slice in this manner. And your Slice expression should just be [visiting date] >= (TODAY()-31), because this is what will produce a TRUE or FALSE result for if the row is to be included in the Slice.

View solution in original post

10 REPLIES 10

Bahbus
Participant V

What exactly is the question? What is it that you are trying to accomplish?

Thank you…
I got error when wrote this expression.

What is the error?

2X_a_a182c51ee501a4248d148d9e1261ac2cb7cdb0e7.png

So, the slice expression by default acts as a FILTER() pointing to Source Table right about it. For example, in the screenshot you provided, that New Slice is setup to FILTER(“Sheet1”,…). All you need to do is put the condition on which is filters. Which would be the [visiting date] >= (TODAY()-31) part.

Sorry can you elaborate?

When using slices, it already knows that you are going to be FILTERing certain data from the table. So the slice is already going to check row by row whether or not to include each one. You are just providing the conditional statement to the slice that decides if it is included.

Please read through this article:

I read the article and I created many slices before but this is the first time to use filter expression. I want to know, why I got error? and Is there suitable procedure to solve this issue?
Thank you.

You’re getting an error because like I said, the FILTER part of the expression is built into the Slice functionality. The expression for a slice must return a TRUE or FALSE result. The FILTER expression returns a LIST from a table based off the provided condition.

Therefore, you cannot use FILTER in a Slice in this manner. And your Slice expression should just be [visiting date] >= (TODAY()-31), because this is what will produce a TRUE or FALSE result for if the row is to be included in the Slice.

Thanks a lot, It’s solved.

Top Labels in this Space