Forum Discussion
Anonymous
10 years agoNot applicable
Group by in a new column
Hi everyone! I want to add a new column with the family of the items in a table. There is any formula in which you give a list of values and if the value is matched then you make an action. Som...
- Anonymous10 years ago
Hi Mozasf,
You could use if function or switch function to create a calculate column to achieve your requirement.
Sample:
1. IF function.
Family = if([ID_item]=1|| [ID_item]=2||[ID_item]=4,"Family_1",if(OR([ID_item]=3,[ID_item]=5 ),"Family_2","Family_3"))
2. Switch function.
Family = SWITCH([ID_item],1,"Family_1",2,"Family_1",4,"Family_1",3,"Family_2",5,"Family_2","Family_3")
Regards,
Xiaoxin Sheng
Anonymous
10 years agoNot applicable
Hi Mozasf,
You could use if function or switch function to create a calculate column to achieve your requirement.
Sample:
1. IF function.
Family = if([ID_item]=1|| [ID_item]=2||[ID_item]=4,"Family_1",if(OR([ID_item]=3,[ID_item]=5 ),"Family_2","Family_3"))
2. Switch function.
Family = SWITCH([ID_item],1,"Family_1",2,"Family_1",4,"Family_1",3,"Family_2",5,"Family_2","Family_3")
Regards,
Xiaoxin Sheng
Anonymous
10 years agoNot applicable
Thaks Anonymous!
Both solutions look good but I think that Switch function will work better for my case.