Having issue with SELECT and IN expressions

Hi everyone

I have read this post in the forum

https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/How-to-create-a-quot-group-by-quot-look-in-pdf-Generation/m-p/661141#M229286

and I am trying to do something similar. I have managed to create the group by effect using these statements

Outer Start expression (group by)

<p><<Start:FILTER(Quote Detail, [Line ID]=MAXROW(Quote Detail,_Rownumber,AND( [_THISROW] = [QUOTE ID] ,[Category]=[_THISROW-1].[Category])))>></p><p> </p>

Inner Start Expression (details for the group)

<td><p><span><<Start:FILTER(Quote Detail,AND([_THISROW] = [QUOTE ID],[QPR ID].[Category]=[_THISROW-1].[Category]))>><<[QPR ID].[DESCRIPCIÓ]>></span></p>

This works - thanks to all who have posted and contacted with me ( @eric_niedergang ).

However , I need to sort the Quote detail by Category before breaking on the Category. So I am rewriting the start statements following the suggestion of @TeeSee1 in the initial article displayed. However . i get IN function is used incorrectly.

<p><<Start:SELECT(Category[Category ID],IN(SELECT(Quote Detail[Category],[Quote ID]=[_THISROW].[Quote ID])),TRUE)>></p>

I do not see any basic difference from my expression comparing to the expression in the article.

Can any one point out what I cannot see?

Thanks

Matt

The IN() expression needs two components. The value and the list.. and in this order. So your formula needs to be something like.. IN([Column],Table[Column]).

1 Like

Hi Aleksi

thanks for replying.

Cracked It!

<p><<Start:ORDERBY(SELECT(QPRmaster[Category],IN([QPR ID],SELECT(Quote Detail[QPR ID],[Quote ID] = [_THISROW],TRUE)),TRUE),[Cindex])>></p>

I had read the appsheet statement , but I read it again after you message

Marked as Solved

You’re welcome!