Skip to main content
Solved

Using GI as a table within a GI - "Count" not being pulled in


We just upgraded to 2024r1 and now that I can use GIs as tables to look up against within GIs, I was trying to build some more complex reports set up that my sales team requested.

They want to view, by customer, the Count of Invoices, Sum of Units Sold, and Sum of Dollar Sales for Last Year’s Month to Date, side by side with This Year’s Month to Date.

I can get this information for one time period in a GI pretty easily.  So I set up two GIs for the two different time periods, and then built a 3rd GI to combine the data from both GIs by linking them to the customer table.  Everything seems to work correctly except that the Count of Invoices is coming up blank on the combined GI.  They show up on the “child” GIs properly.  Anyone have a solution to getting the count data to show up?

Image of Child GI Results, Count circled:

Image of the combined GI, Count Fields coming up blank:

 

Image of the combined GI.  Note: I’ve tried Aggregating by Count, Sum, Max, <Blank>, and tried different Schemas, but nothing has gotten anything to generate for these Count Fields in this GI.  Everything else is populating just fine.

Thanks for the help!

-Mark V

Best answer by lauraj46

Hi @mverbeek ,

I was able to get this to work by using the SUM function in the subquery instead of COUNT.  For the field value I used the formula =1.  

View original
Did this topic help you find an answer to your question?

4 replies

lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • 595 replies
  • August 27, 2024

Hi @mverbeek ,

On the child GIs, are you using the aggregate "Count" function, or the special built-in Count field?  

Laura 


  • Author
  • Freshman I
  • 3 replies
  • August 27, 2024

@lauraj46 , I am using the aggregate “count” function on the child/Source GIs.  They are grouped by customer number in order to remove duplication on the combined GI.

I tried to summarize at a reference number level on the child/source GIs, but that ended up creating mass duplication of records on the combined GI whenever a customer had 2+ reference numbers in both years.


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • 595 replies
  • Answer
  • August 27, 2024

Hi @mverbeek ,

I was able to get this to work by using the SUM function in the subquery instead of COUNT.  For the field value I used the formula =1.  


  • Author
  • Freshman I
  • 3 replies
  • August 27, 2024

Thanks @lauraj46 !  That got me on the right track!  As I was using the ARTran table for the source tables, it got me number of line items, and I just modified to an IIF statement to display a 1 for only line 1 and a 0 for any other line to get number of invoices!  Now it displays on the combined GI!  Thanks again!

=IIf( [ARTran.LineNbr]=1, 1, 0 )


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings