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
 Replacing empty cells in with the previous value?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Raul_V

Germany
3 Posts

Posted - 05/19/2021 :  03:40:06 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin 2020 (64-bit) SR1
Operating System:W10

Dear all,

I am very new to Origin, so please indulge me if the answer to this question is too evident.

For a large datalogging csv file, we found that one of the queries was not constantly giving the value for each timestamp if there wasn´t any change (discrete numerical values). That led to have many blanks randomly distributed through the affected columns in a file with more than 80k rows. I would like then to "replenish" them for some posterior filtering, correlations, etc.

Despite my first attempt to find a "how-to" either in the forum and/or in the web, I didn´t succeed. Therefore I will be very happy for some guidance with this issue.

Regards,

R.

Shirley_GZ

China
Posts

Posted - 05/19/2021 :  05:32:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Raul_V,

If you want to fill the empty cell with the previous values above the cell, you can try to use Set Column Values tool with the formula below:



https://www.originlab.com/doc/Origin-Help/Wks-SetColVal-QuickStart

Please let me know if you have any problem with this solution.

Thanks,
Shirley
OriginLab

Originlab Technical Service Team
Go to Top of Page

Raul_V

Germany
3 Posts

Posted - 05/26/2021 :  07:12:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Shirley,

thanks a lot for the prompt reply. I could only sit back on this topic and I tried your solution. However the outcome is not clear to me. Basically when I hit apply, the software automatically changes the "," to "." and instead of filling the missing values with the former in the column, it just simply fill all of them with "1". I have attached a couple of screenshots to illustrate this issue in order to find out what I´m still doing wrong.

Looking forward to hear from you,
Go to Top of Page

snowli

USA
1446 Posts

Posted - 05/26/2021 :  2:17:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello, for German Origin, comma may be used as decimal separator.
So could you use ; instead of , between arguments in function.

E.g. if(B==0/0; B[i-1]; B)

Thanks, Snow

Go to Top of Page

Raul_V

Germany
3 Posts

Posted - 05/31/2021 :  08:54:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello Snow,

I actually tried already and it is even worse: it crashes Origin :(,

the thing is that I even changed the settings in windows and this behavior continues.....
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 05/31/2021 :  8:20:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The B[i-1] notation needs a newer version. I checked it didnt work in 2020, 2020b, but it worked in 2021 at least. Best if you download the latest version, which is 2021b.

if(isNa(B),B[i-1],B)

or

isNa(B)? B[i-1] : B

to avoid the comma issue.

CP
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