Jump to content


Photo

Custom Replace, when statements?


  • Please log in to reply
6 replies to this topic

#1 jgorsk32

jgorsk32

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 23 May 2019 - 01:24 PM

Hello all, trying to resolve an issue with a simple data wizard manipulation and wondering if I could get some feedback.

 

Basically I am trying to perform the following operation: For all times points corresponding with each subject involved in the study, I would like to replace the concentration values where time is not equal to 0 with the corresponding time point that is associated with time=0 for the same subject. 

 

I've tried using an If + substitute statement, but I'm not sure how to substitute the value with a new one which corresponds to a different value in another cell, especially when it changes for every subject. 

 

Is there any way to have a custom transformation which would perform this operation? 

 

Thanks in advance,

 

Joseph



#2 Simon Davis

Simon Davis

    Advanced Member

  • Administrators
  • 1,316 posts

Posted 23 May 2019 - 02:51 PM

Sorry I don't quite understand what you're asking.  Are you saying you want the value at time 0 to be assigned to all time points. by subject.  I think this would be easier with a filter and merge.

Can you provide a dataset that includes a desired result column ?  it doesn't have to be super large, a few profiles should do the trick and help development/testing.

 Simon


Edited by Simon Davis, 23 May 2019 - 02:53 PM.


#3 jgorsk32

jgorsk32

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 23 May 2019 - 03:02 PM

Hi Simon, here's a table representation of the data transformation i'm trying to perform: 

 

What would be the fastest way to apply a data wizard to achieve the desired replacement concentration is my question

 

 

Attached Files


Edited by jgorsk32, 23 May 2019 - 03:09 PM.


#4 Simon Davis

Simon Davis

    Advanced Member

  • Administrators
  • 1,316 posts

Posted 23 May 2019 - 03:06 PM

please attach as CSV or excel.  Also note what I ma saying that DW might not be the best tool to achieve what you are asking.



#5 jgorsk32

jgorsk32

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 23 May 2019 - 03:09 PM

please attach as CSV or excel.  Also note what I ma saying that DW might not be the best tool to achieve what you are asking.

here's an excel file

Attached Files



#6 Ana Henry

Ana Henry

    Advanced Member

  • Members
  • PipPipPip
  • 232 posts

Posted 23 May 2019 - 08:11 PM

Hello Joseph,

There are several ways to accomplish this.  In the attached project I show 3 ways of getting what you want.  There is a way to use a single datawizard (Option1) that requires 4 steps.  Option 2 and Option 3 first filter out time=0 row and then they merge or crossproduct with the original dataset. The project was created in Phoenix 8.1.  If you don't have access to it, I have included a picture of the data wizard summary for you to recreate.

 

Hope this helps,

Ana

 

DW_Summary.JPG Attached File  Test.phxproj   452.72KB   679 downloads



#7 jgorsk32

jgorsk32

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 24 May 2019 - 07:17 AM

Hello Joseph,

There are several ways to accomplish this.  In the attached project I show 3 ways of getting what you want.  There is a way to use a single datawizard (Option1) that requires 4 steps.  Option 2 and Option 3 first filter out time=0 row and then they merge or crossproduct with the original dataset. The project was created in Phoenix 8.1.  If you don't have access to it, I have included a picture of the data wizard summary for you to recreate.

 

Hope this helps,

Ana

 

attachicon.gifDW_Summary.JPGattachicon.gifTest.phxproj

Thanks for your help Ana






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users