Forum Discussion
talhaparvaiz
Helper I
5 years agoNew column with values based on another column
Hi, I have a table that looks something like this Product ProdA ProdBProdA ProdC ProdDProdB ProdE I want to add a new column and set the value to GroupA if any of th...
- Anonymous5 years ago
Hi talhaparvaiz
Try to add a new column like this:
Group = IF ( ISERROR ( SEARCH ( "ProdA", yourTable[Product] ) ), "GroupOther", "GroupA" )
amitchandak
Super User
5 years agotalhaparvaiz , Create a new column like
Switch( True() ,
[Product] in {"ProdA","ProdBProdA"} ,"GroupA",
[Product] in {"ProdC","ProdE"} ,"GroupOther",
,"GroupOther"
)
Also check