File Exchange
Try Origin for Free
The Origin Forum
Home
|
Profile
|
Register
|
Active Topics
|
Members
|
Search
|
FAQ
|
Send File to Tech support
Username:
Password:
Save Password
Forgot your Password?
|
Admin Options
All Forums
Origin Forum for Programming
LabTalk Forum
How to GROUP&SUM column data (group by)
New Topic
Reply to Topic
Printer Friendly
Author
Topic
porter
Canada
4 Posts
Posted - 12/01/2010 : 02:06:13 AM
Hello,
I do not know how to group data and calculate the sum of of a specific column within this group.
Example: (data are in Book1/sheet1)
Col_A_______Col_B
1____________3
1____________2
1____________1
2____________1
2____________2
3____________3
3____________2
3____________1
3____________1
Result should be:
Col_C______Col_D
1____________6
2____________3
3____________7
Can I somehow integrate a SQL statement into my Lab Talk script to do the job? ....any other suggestions?
Thanks for your help.
porter
greg
USA
1379 Posts
Posted - 12/01/2010 : 11:01:08 AM
Select column B and choose Statistics : Descriptive Statistics : Statistics on Columns
Choose column A as the Grouping variable
Uncheck everything except Quantities to Compute : Moments : Sum in the dialog and click OK.
porter
Canada
4 Posts
Posted - 12/02/2010 : 10:23:30 AM
Hi Greg,
Thanks for your help! Worked great for me.
Edited by - porter on 12/02/2010 10:24:56 AM
Topic
New Topic
Reply to Topic
Printer Friendly
Jump To:
Select Forum
Origin Forum
Origin Forum
Origin Viewer Forum
Origin Forum for Programming
Forum for Python
LabTalk Forum
Forum for Origin C
Forum for Automation Server/COM and LabVIEW
Origin中文论坛
Origin 中文论坛 (Chinese Origin Forum)
Japanese Origin Forum
Origin日本語フォーラム (Japanese Origin Forum)
Origin on Linux
The Origin on Linux Forum
Private Forums
Distributor Forum
--------------------
Home
Active Topics
Frequently Asked Questions
Member Information
Search Page
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000