Looping through a unique items in a column and then tabulateHi all,
My data table consists of 3 columns (Name, Hours, and Money). This is what I wanted to do.
Step 1: Find the unique items in the column "Name". My datatable is dt. Here is what I do.
Summarize(dt, uniqNames = by(:Name));
Show(uniqNames);
This provides me a list
Step 2: For each unique item in the list, I wanted to tabulate the sum of hours and money. For example, for item A, sum of hours = 24 and sum of money = 10. I want to do the same for item B, C, and D.
Can I get some help on scripting this?
Automation and ScriptingConsumer and Market ResearchData Blending and CleanupMass CustomizationQuality and Process EngineeringRe: Looping through a unique items in a column and then tabulateI'm not exactly sure what you want to calculate using the tabulate.Basically same thing you would get with Local Data Filter?

Is there some specific reason why you wouldn't perform all calculations either with Summarize or Tabulate (or maybe Summary table)? Below are examples:
Tabulate:

Summary table:

Summarize:
Names Default To Here(1);
Summarize(Current Data Table(), names = By(:NAME), sum_hours = Sum(:Hours), sum_money = Sum(:Money));
Show(names, sum_hours, sum_money);

Re: Looping through a unique items in a column and then tabulateI think that all you need to do is to use the Summary Platform.

Names Default To Here( 1 );
dt = Current Data Table();
dt << Summary(
Group( :NAME ),
Sum( :Hours ),
Sum( :Money ),
Freq( "None" ),
Weight( "None" ),
statistics column name format( "column" ),
Link to original data table( 0 )
);