New to Alteryx. I need a way to create new column for patients of first dose vs follow up doses. In Tableau the equation was
If [Admin Date] =
{fixed [Account Number], [Prescription Number] : str(Min([Administration Date]))}
then 'First Dose'
else 'Follow Up Doses'
END
I need to get the Min or earliest [Administration Date] on each specific Prescription Number, within each grouping of Account Numbers.
Solved! Go to Solution.
Hi @adam_jones could you share some dummy data as an example?
You could use a summarize tool to group by Prescription Number, taking the Min Date, then join back to the data. Then use a formula tool to compare the administration date to the min date.
Could you share a sample data with the expected result?
It will help us to give you the solution.
Best Regards,
*Not actual Date (obviously)*
Essentially, I need each earliest date of each prescription of each patient to come back as First Dose and everything else is Follow-Up.
If I do the summarize tool, do they work in stacking order? Ex. I group Account, then group Presc. #, then min admin date. Then do IF *new column* = [Admin Date] Then "First Dose" ELSE "Follow-Up" ENDIF?
Yup summarize and formula tool will do the job.
If you can share image as an excel will be better for us to help you 🙂
Regards,
This worked, thank you again!