How can from of List to "Yes/No"

Hi.

I dont understand the type "List" and "Yes/no". And yes... i see all wiki, but maybe its not my languaje but i cant understant and i dont understand how can i translate and traspassing it.

I want in slice, only the last 10 rows of the same name. I have 300 rows with the same "name" and i want the last rows of it.

 

 

INDEX(
  ORDERBY(
    FILTER(
      "Students",
      ([Name] = "Peter")
    ),
    [Date],
    TRUE
  ),
  10
)

https://support.google.com/appsheet/answer/10107362?hl=en

 

 

TOP(					
  ORDERBY(
    FILTER("Students",
    ([Name] = "Peter")
        ),
  [_RowNumber], TRUE),
10)


The expression is valid but its result type 'List' is not one of the expected types: Yes/No

 

Solved Solved
0 5 801
1 ACCEPTED SOLUTION

You could likely consider using the IN function.

IN(
[_RowNumber or whatever is the key column],
TOP(					
  ORDERBY(
    FILTER("Students",
    ([Name] = "Peter")
        ),
  [_RowNumber], TRUE),
10)
)

 

View solution in original post

5 REPLIES 5

You can try

AND(
 [Name] = "Peter",
 [_RowNumber] 
 >= 
 INDEX(
  SORT(
   SELECT(
    Students[_RowNumber],
    [Name] = "Peter"
   ),
   TRUE
  ),
  10
 )
)

the [Name] is "Peter"
AND
[_RowNumber] is equal or greater than the tenth most recently created row with [Name] = "Peter"

A list is an object that contains multiple elements.

A Yes/No object is a single value, either true of false.

A slice's filter expression has to return a single Yes/No value. That is what the error message is telling you. 

I recommend @dbaum 's solution. Much more straight forward!

You could likely consider using the IN function.

IN(
[_RowNumber or whatever is the key column],
TOP(					
  ORDERBY(
    FILTER("Students",
    ([Name] = "Peter")
        ),
  [_RowNumber], TRUE),
10)
)

 

Yeah, its work. And sorry for reply too late.

And if i want 2 filters?

Example: Peter have 3 class. Math, French and English and i want the note of 1 of every class.

I try this, but i dont know how take another filter for "Match, French and English of every Student.

 

 

([_THISROW] = MAXROW("Students", "Date", ([_THISROW].[Name] = [Name])))

 

 


 

Ok, for more filters:


 

 

 

 

([_THISROW] = MAXROW("Stdents", "Date", 
AND(
([Class]=Math),
([_THISROW].[Name] = [Name]))))

 

 

 


 

Top Labels in this Space