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
)