The Origin Forum
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
 Origin Forum
 Calculate monthly data based on daily data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

b404957074

New Zealand
4 Posts

Posted - 07/23/2023 :  01:19:59 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver Origin Pro 2022. and Service Release (Select Help-->About Origin):
Operating System: Windows

Hi there,

I have two columns of data, the first column is data in the format of DD/MM/YYYY, and the second column is the water content for the corresponding date. How can I ask Origin to produce the third column showing the monthly average water content?

Thank you

snowli

USA
1379 Posts

Posted - 07/24/2023 :  09:11:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can use Analysis: Data Manipulation: Reduce by Group and set the sugroup method by X increment and set increment to 1month.

Also set Merge X by and Merge Y by average.

Thanks, Snow
Go to Top of Page

b404957074

New Zealand
4 Posts

Posted - 07/24/2023 :  5:03:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Snow, thank you for your answer.
However, it turns out that there is no option for me to set increment to 1 month. Please see the attached pic.
Thank you.

quote:
Originally posted by snowli

You can use Analysis: Data Manipulation: Reduce by Group and set the sugroup method by X increment and set increment to 1month.

Also set Merge X by and Merge Y by average.

Thanks, Snow


Go to Top of Page

snowli

USA
1379 Posts

Posted - 07/24/2023 :  5:13:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The input field is blank in your dialog.

Please
1. Double click X column and make sure it's set as Date
2. Select XY column and then choose the menu will auto fill the input field.
3. Then you should be able to enter incrment like 7 days, 1 year, 1 month, etc. as X increment.



Please note that the output are two columns, 1 for X and one for Y.
I choose to use subgroup beginning as merged X so it shows 1/1/2023, 2/1/2023.

If u really want to see 1, 2, 3, ... u can
1. add another column and set F(x) formula as month(C) to calculate month part of column C as the image above. If u set column E as X and select E and D to plot, it will plot D against E(X).

2. double click column C. in column properties set the Display as Custom Display. And set Custom Display as M, which will show it as 1, 2, 3 but internally it's still 1/1/2023, ...

Thanks, Snow
Go to Top of Page

b404957074

New Zealand
4 Posts

Posted - 07/25/2023 :  07:36:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, Snow. It worked, but not entirely.
I chose to use the subgroup beginning as merged X as you did.
D(x3) should be 01/06/2022, 01/07/2022...like yours, right?
Thank you.
Go to Top of Page

snowli

USA
1379 Posts

Posted - 07/25/2023 :  09:28:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Sorry for this.

This is a bug fixed in Origin 2023b released in late April.
https://www.originlab.com/ReleaseNotes/detail.aspx?id=2023b1ORG-25670

Before Origin 2023b, it uses hard coded 365 days for 1 year and 31 days for 1 month.

Could you check if your maintenance is valid for Origin 2023b upgrade.


One workaround in your version will be create a new column with F(X) as month(B) to extract month part.
Then select Worksheet: Remove/Combine Duplicated Rows and use the calculated month column as reference column, and merge data by average.
U set output to New sheet so original sheet still kept.

Or select column C do statistics: Descriptive statistics and set the calculated month column as Group. Set quantities to only output average.

Thanks, Snow
Go to Top of Page

b404957074

New Zealand
4 Posts

Posted - 07/26/2023 :  07:02:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks, may I get to know how to extract the month part?
Go to Top of Page

snowli

USA
1379 Posts

Posted - 07/26/2023 :  09:04:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
See first image in my reply.
Use Month( ) function in F(X) to extract month from a column.

Thanks, Snow
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000