Forum Discussion
CMoppet
2 years agoHelper IV
Conditional Column if value appears within a list
Hello, I have a conditional column in a table called 'WO DATA' with various clauses based on the values in a column called 'Account NAME'. It's straightforward because I can reply on the accou...
- 2 years ago
Try the following :
Column = IF( [SAP Account Id] IN {5300023122, 5300023123, 5300023124, 5300023125, 5300023126, 5300023127, 5300023129, 5300023130, 5300023132, 5300023131}, "EMCOR", IF( CONTAINSSTRING([Account Name], "Waitrose"), "Waitrose", IF( CONTAINSSTRING([Account Name], "John Lewis"), "John Lewis", IF( CONTAINSSTRING([Account Name], "Thames Water"), "Thames Water", IF( CONTAINSSTRING([Account Name], "WSP"), "WSP", BLANK() ) ) ) ) )
alish_b
2 years agoSuper User
Hi CMoppet ,
You could try the following:
Customer Group = SWITCH(
Customer Group = SWITCH(
TRUE(),
'WO DATA'[Account Name] = "Waitrose", "Waitrose",
'WO DATA'[Account Name] = "John Lewis", "John Lewis",
'WO DATA'[Account Name] = "Thames Water", "Thames Water",
'WO DATA'[Account Number] IN {5300023122, 5300023123, 5300023124, 5300023125, 5300023126, 5300023127, 5300023129, 5300023130, 5300023132, 5300023131}, "AZTEC"
)
It is not truly an elegant solution but it should get the work done if it is a simple report.
Regards,
It is not truly an elegant solution but it should get the work done if it is a simple report.
Regards,
Alish