Forum Discussion
KayCon
2 years agoFrequent Visitor
Switch() using multiple conditions within same ID
Afternoon All, I am trying to calulate a column to group these ID groups into the correct zones. I've made a dummy table to try and explain what I mean. All have to be within the same ID. Zone A...
FreemanZ
2 years agoSuper User
hi KayCon
try to add a calculated column like:
Zone =
SWITCH(
TRUE(),
COUNTROWS(
FILTER(
data,
data[id]=EARLIER(data[id])
&&data[age]<=4
&&data[Is Child]=1
)
)<>0,
"Zone A",
COUNTROWS(
FILTER(
data,
data[id]=EARLIER(data[id])
&&data[age]<=18
&&data[age]>=16
&&data[Is Child]=1
)
)<>0,
"Zone B",
"Zone C"
)
it worked like:
KayCon
2 years agoFrequent Visitor
That worked perfectly, thank you for your help 🙂