PDF Report | Dynamic Grouping Times Out

I can get this report to generate sporadically, the majority of the time it times out after 124ish seconds when monitoring it. I have removed the top section (pasted below) and it runs fine. I'm open to add columns in the invoice table that calculate this but I get stuck writing it 

Equipment Summary


<<Start: ORDERBY( FILTER( "Ticket Details",    AND( ([_THISROW].[Invoice #] = [Foreman Ticket ID].[Invoice]), ( [_ROWNUMBER] = MIN(  SELECT(  Ticket Details[_ROWNUMBER], AND( ([_THISROW].[Invoice #] = [Foreman Ticket ID].[Invoice]), (("x" & [_THISROW-1].[Item].[Item Name]) = ("x" & [Item].[Item Name]))  )  )  )  )  )  ),  ISBLANK([Item].[Item Name]), FALSE,  [Item].[Item Name], FALSE)>> <<[Item].[Item Name]>> : <<SUM( SELECT( Ticket Details[Total], AND( ([_THISROW].[Invoice #] = [Foreman Ticket ID].[Invoice]), (("x" & [_THISROW-1].[Item].[Item Name]) = ("x" & [Item].[Item Name])) ) ))>> 

<<End>>

By Unit Measures


<<Start: ORDERBY( FILTER( "Sub Works",    AND( ([_THISROW].[Invoice #] = [Foreman Ticket ID].[Invoice]), ( [_ROWNUMBER] = MIN(  SELECT(  Sub Works[_ROWNUMBER], AND( ([_THISROW].[Invoice #] = [Foreman Ticket ID].[Invoice]), (("x" & [_THISROW-1].[Material_UOM]) = ("x" & [Material_UOM]))  )  )  )  )  )  ),  ISBLANK([Material_UOM]), FALSE,  [Material_UOM], FALSE)>> <<[Material_UOM]>> : <<SUM( SELECT( Sub Works[volume], AND( ([_THISROW].[Invoice #] = [Foreman Ticket ID].[Invoice]), (("x" & [_THISROW-1].[Material_UOM]) = ("x" & [Material_UOM])) ) ))>> 

<<End>>

Other Billable Expenses


<<Start: ORDERBY( FILTER( "Receipts",    AND( [Billable]=โ€Yesโ€,([_THISROW].[Invoice #] = [Foreman Ticket ID].[Invoice]), ( [_ROWNUMBER] = MIN(  SELECT(  Receipts[_ROWNUMBER], AND( ([_THISROW].[Invoice #] = [Foreman Ticket ID].[Invoice]), (("x" & [_THISROW-1].[Cost Code]) = ("x" & [Cost Code]))  )  )  )  )  )  ),  ISBLANK([Cost Code]), FALSE,  [Cost Code], FALSE)>> <<[Cost Code]>> : <<SUM( SELECT( Receipts[Amount], AND( ([_THISROW].[Invoice #] = [Foreman Ticket ID].[Invoice]), (("x" & [_THISROW-1].[Cost Code]) = ("x" & [Cost Code])) ) ))>> 

<<End>>

ZOCO_Unlimited_0-1686401563814.png

 

 

Link to doc: https://docs.google.com/document/d/1lOjcpltj9Rs7jK2Yp3RstpLVTyTzkALuMSJIy3uOWUI/edit?usp=sharing 

@Steve  if you're available, Prior Post where the setup formula was created; https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Help-with-Summary-Report-totals-by-column-Pivot... 

0 3 213
3 REPLIES 3
Top Labels in this Space