Issue with creating calculated field based on aggregated dataset field

I am attempting to take a field that I created in my Database/Dataset, which aggregates rows to get a hierarchy (so every unique id has one highest condition), and then use that field in a calculated field in my analysis to determine which parameter to use for payouts, which we are allowing user to change dynamically using a text field control. Any help would be appreciated. For what it’s worth, I am using redshift at the moment

ifelse(
{Highest Condition of Interest} = ‘Appendix cancer’, ${t3appendixcancer},
{Highest Condition of Interest} = ‘Brain Cancer’, ${t3braincancer},
{Highest Condition of Interest} = ‘Breast Cancer’, ${t3breastcancer},
{Highest Condition of Interest} = ‘Cardiac birth defect’, ${t3cardiacbirthdefect},
{Highest Condition of Interest} = ‘Colon cancer’, ${t3coloncancer},
{Highest Condition of Interest} = ‘Esophageal cancer’, ${t3esophagealcancer},
{Highest Condition of Interest} = ‘Extensive Tooth Decay’, ${t3extensivetoothdecay},
{Highest Condition of Interest} = ‘Female Infertility’, ${t3femaleinfertility},
{Highest Condition of Interest} = ‘Hepatic Steatosis (fatty liver disease)’, ${t3hepaticsteatosis},
{Highest Condition of Interest} = ‘Lung Cancer’, ${t3lungcancer},
{Highest Condition of Interest} = ‘Miscarriage or fetal death (only)’, ${t3miscarriage},
{Highest Condition of Interest} = ‘Nerve damage’, ${t3nervedamage},
{Highest Condition of Interest} = ‘Neurobehavioral Effects: ALS/Lou Gehrigs Disease’, ${t3als},
{Highest Condition of Interest} = ‘Neurobehavioral Effects: Epilepsy’, ${t3epilepsy},
{Highest Condition of Interest} = ‘Neurobehavioral Effects: MS’, ${t3multiplesclerosis},
{Highest Condition of Interest} = ‘Neurobehavioral Effects: Other’, ${t3otherneurobehavioraleffects},
{Highest Condition of Interest} = ‘Pancreatic Cancer’, ${t3pancreaticcancer},
{Highest Condition of Interest} = ‘Prostate cancer’, ${t3prostatecancer},
{Highest Condition of Interest} = ‘Renal Toxicity’, ${t3renaltoxicity},
0
)

Hi @dclutes3

You have provided your objective; but not the issue you are facing. Is there any error in your calculated field? Also, share the formula for the Highest Condition of Interest and your structure and sample of the dataset raw data.

Regards,
Giri

Hi @dclutes3,
It’s been awhile since we last heard from you. If you are still facing the same issue, could you please include some additional information like requested above?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @dclutes3

Since we have not heard back from you, I’ll go ahead and close/archive this topic. However, if you have any additional questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!