Forum Discussion
Help improving nested IF statements
- 5 years ago
I think you can use a switch
Cancellation Notice Time Buckets =
SWITCH (
TRUE (),
[CancellationLeadTimeInDays] >= 92, "More than 3 months",
[CancellationLeadTimeInDays] >= 61, "2-3 months",
[CancellationLeadTimeInDays] > 30, "1-2 months",
[CancellationLeadTimeInDays] > 14, "3-4 weeks",
[CancellationLeadTimeInDays] > 7, "1-2 weeks",
[CancellationLeadTimeInDays] > 2, "Within 1 week",
[CancellationLeadTimeInDays] > 1, "Within 48 hours",
[CancellationLeadTimeInDays] >= 0, "Within 24 hours",
"After appointment"
)
You need to create it as a calculated column, not a measure
It is not a measure. Right now CancellationLeadTimeInDays is pulled directly from our datamart in Caboodle as a numeric column in the dataset. I don't control the dataset, so I'm guessing I would need to replicate this column somehow to make it either a measure or a calculated column...
Any ideas? Thanks for your help!