GroupBy with multiple fields

TeeBI for Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
stoffman
Newbie
Newbie
Posts: 14
Joined: Wed Dec 29, 2021 12:00 am

GroupBy with multiple fields

Post by stoffman » Thu May 25, 2023 8:39 pm

Hi,

How can do multiple group-by consolidation? As mentions in the docs that can be done, But I didn't find a way. For example suppose I wish to group by by both "Country" and "City":

Code: Select all

  S:= TSummary.Create(nil);
  S.AddGroupBy(Data['Country']);
  S.AddGroupBy(Data['City']);
  S.AddMeasure( Data['City'], TAggregate.Count );
I get the following error:
"Unkown field type: Count of City"

Just doing

Code: Select all

  S.AddGroupBy(Data['City']);
  S.AddMeasure( Data['City'], TAggregate.Count );
Works great.

What am I doing wrong?

Thanks,

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: GroupBy with multiple fields

Post by Yeray » Mon Jun 05, 2023 8:03 am

Hello,

Have you seen the Visualizer demo at "Demos\VCL\Visualizer"?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply