Data wizard

Hi All,

I had some problem when I did the Data Wizard–>custom transformation.

There are 4 columns (P1, P2, T1 and T2) and some columns contain NULL (empty cells) in the dataset. I want to add a new column P3.

If P2 is not empty, P3=P1

If P2 is empty and both T1 and T2 is not empty and T1>T2, P3=P1

otherwise, P3 is left empty.

Would someone help me? I also attached the project.

Thank you!

LLLi

Data Wizard.phxproj (123 KB)

Dear LLLi,
There are several ways to do this, I am attaching a project so you can see how I wrote it. In essence,
I first created IsNull variables for P2, T1, and T2 then wrote the condition as

if((((P2Empty+T1Emtpy+T2Empty)=“FalseFalseFalse”)&(T1>T2)),P1,)

Best,
Ana
p.s. project attachedData wizard Support.phxproj (277 KB)

Hi Ana,

Thank you for your reply.

I can not open your project. Did you use Phoenix 7? Mine is version 6.4.

I was told “The project you are trying to open was created with a newer version of Phoenix (7.0.0.2535) and might not open correctly. Would you like to try to open the project anyway?” After click yes, the phoenix has stopped working.

How to get Phoenix 7? Just download the new software? Any fee for the update?

Thank you!

LLLi

Hello,
Attached is the same project created with Phoenix WinNonlin 6.4. Hope this works for you.

Regarding Phoenix 7, you can download the new version from the Support site and if you have a
current valid license it will transfer it automatically for you. It has some nice new
graphing features so give it a try :slight_smile:

AnaData wizard_Ana_6.4.phxproj (253 KB)

Dear LLLi,

the Ana’s formula doesn’t work when P2 is not empty

My rusty and very simple version:

if(isNull(P2), if(T1>T2, P1, ), P1)

At least it works for your dataset

Dear mittyright,

Thank you for your reply! Your version is very simple but works! I am impressed…

Would you please introduce me some materials about the if statement? I didn’t find much information in the Phoenix Data Tools and Plots Guide. Thank you!

LLLi

Dear LLLi,

I really don’t know how to help you with if statement.

Honestly speaking the structure of if statement in Data Wizard is very close to the if statement in Excel. So if you have some experience in Excel you can just use it.

Dear mittyright,

Thank you! I will look through the if statement in Excel.

LLLi

LLLi, my tip would be that you can simply click anywhere in the Function list and having found the function you want (pressing i will take you to if for instance).

then you can click and drag that to the Formulat box and you will get the example syntax;

if(conditional,true,false)

once you follow that you realise it’s quite easy to nest statements or combine with other functions e.g. IsNull.

Simon.

Hi,

I have a very complex condition to deal with here. In my project attached, each subject have 1 or 2 time points (week2 and/or week6) and corresponding parameters P1, P2 P3 and a flag (Y or N).

I want to get a new set of P1, P2, and P3.

The condition is: for each subject,

if subjects only have one week, the new parameter = the previous parameter.

If there are two weeks,

if both flags for two weeks are Y or N, the new parameter = the parameters at week 6.

if one flag=Y and one flag=N then keep the parameter when flag=Y

Hopefully I explain the condition clearly. Can Data Wizard do this job?

Thank you!

LLLi

complex.phxproj (34 KB)