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-... 

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>&lt;&lt;Start:FILTER(Quote Detail, [Line ID]=MAXROW(Quote Detail,_Rownumber,AND( [_THISROW] = [QUOTE ID] ,[Category]=[_THISROW-1].[Category])))&gt;&gt;</p><p>&nbsp;</p>

 

 

Inner Start Expression (details for the group)

 

 

<td><p><span>&lt;&lt;Start:FILTER(Quote Detail,AND([_THISROW] = [QUOTE ID],[QPR ID].[Category]=[_THISROW-1].[Category]))&gt;&gt;&lt;&lt;[QPR ID].[DESCRIPCIร“]&gt;&gt;</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>&lt;&lt;Start:SELECT(Category[Category ID],IN(SELECT(Quote Detail[Category],[Quote ID]=[_THISROW].[Quote ID])),TRUE)&gt;&gt;</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

Solved Solved
0 3 132
1 ACCEPTED SOLUTION

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]).

View solution in original post

3 REPLIES 3

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]).

Hi Aleksi

thanks for replying. 

Cracked It!

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

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

Marked as Solved

You're welcome!

Top Labels in this Space