Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213916

Group by in a new column

$
0
0

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.

Something like:

 

IF  id_item IN (1,2,4) THEN "Family_1"

ELSE IF id_item IN (3,5) THEN "Family_2"

ELSE "Family_3"

 

I have this:

 

ID_item   Name 

------------------

1             ItemA

2             ItemB

3             ItemC

4             ItemD

5             ItemE

6             ItemF

 

And I want this:

 

ID_item   Name    Family

-----------------------------

1             ItemA    Family_1

2             ItemB    Family_1

3             ItemC    Family_2

4             ItemD    Family_1

5             ItemE     Family_2

6             ItemF     Family_3

 

Thanks!


Viewing all articles
Browse latest Browse all 213916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>