Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Guys, I have the following table:
item_id | Food_name | Food_Price | Classification | Classifications |
1 | hamburguer | 10 | unhealthy | |
2 | ice cream | 11 | unhealthy | |
3 | steak | 12 | unhealthy | |
4 | bread | 13 | healthy | |
5 | coke | 14 | unhealthy | |
6 | juice | 1 | healthy | |
7 | green salad | 2 | healthy | |
8 | mango | 3 | healthy | |
9 | ham | 15 | healthy | |
10 | cesar salad | 16 | unhealthy | |
11 | chicken | 8 | healthy | |
12 | fish | 8 | healthy | |
13 | tofu | 5 | healthy | |
A | juice | 0.5 | healthy | coke |
B | green salad | 1.5 | healthy | cesar salad |
C | mango | 2.5 | healthy | ice cream |
D | chicken | 7 | healthy | hamburguer |
E | fish | 7 | healthy | hamburguer |
F | tofu | 4 | healthy | hamburguer |
G | fish | 10 | healthy | hamburguer |
I would like a script that everytime that it sees in the Classifications column a name, that they look for this name in the column "Food_name" (same table), and return it that "Food_name" item_id and Food_Price.
How do we do that?
Table:
Load * Inline [
item_id,Food_name,Food_Price,Classification,Classifications
1,hamburguer,10,unhealthy,
2,ice cream,11,unhealthy,
3,steak,12,unhealthy,
4,bread,13,healthy,
5,coke,14,unhealthy,
6,juice,1,healthy,
7,green salad,2,healthy,
8,mango,3,healthy,
9,ham,15,healthy,
10,cesar salad,16,unhealthy,
11,chicken,8,healthy,
12,fish,8,healthy,
13,tofu,5,healthy,
A,juice,0.5,healthy,coke
B,green salad,1.5,healthy,cesar salad
C,mango,2.5,healthy,ice cream
D,chicken,7,healthy,hamburguer
E,fish,7,healthy,hamburguer
F,tofu,4,healthy,hamburguer
G,fish,10,healthy,hamburguer ];
Left Join(Table)
Temp:
Load item_id as item_id1,Food_name As Classifications,Food_Price as Food_Price1 Resident Table;
Can you provide expected output?
Hi,
Load this table in dashboard and provide Classifications as list box and and create a Table box with all the columns. If you select any classification then the data is automatically filtered and only corresponding values are displayed in Table box.
If this is not your expected, then come up with an example of what you want.
Regards,
Jagan.
I would like to have this output:
item_id | Food_name | Food_Price | Classification | Classifications | item_id1 | Food_name1 |
1 | hamburguer | 10 | unhealthy | |||
2 | ice cream | 11 | unhealthy | |||
3 | steak | 12 | unhealthy | |||
4 | bread | 13 | healthy | |||
5 | coke | 14 | unhealthy | |||
6 | juice | 1 | healthy | |||
7 | green salad | 2 | healthy | |||
8 | mango | 3 | healthy | |||
9 | ham | 15 | healthy | |||
10 | cesar salad | 16 | unhealthy | |||
11 | chicken | 8 | healthy | |||
12 | fish | 8 | healthy | |||
13 | tofu | 5 | healthy | |||
A | juice | 0.5 | healthy | coke | 5 | 14 |
B | green salad | 1.5 | healthy | cesar salad | 10 | 16 |
C | mango | 2.5 | healthy | ice cream | 2 | 11 |
D | chicken | 7 | healthy | hamburguer | 1 | 10 |
E | fish | 7 | healthy | hamburguer | 1 | 10 |
F | tofu | 4 | healthy | hamburguer | 1 | 10 |
G | fish | 10 | healthy | hamburguer | 1 | 10 |
I want the script to provide me the last two columns... How do I script that?
Table:
Load * Inline [
item_id,Food_name,Food_Price,Classification,Classifications
1,hamburguer,10,unhealthy,
2,ice cream,11,unhealthy,
3,steak,12,unhealthy,
4,bread,13,healthy,
5,coke,14,unhealthy,
6,juice,1,healthy,
7,green salad,2,healthy,
8,mango,3,healthy,
9,ham,15,healthy,
10,cesar salad,16,unhealthy,
11,chicken,8,healthy,
12,fish,8,healthy,
13,tofu,5,healthy,
A,juice,0.5,healthy,coke
B,green salad,1.5,healthy,cesar salad
C,mango,2.5,healthy,ice cream
D,chicken,7,healthy,hamburguer
E,fish,7,healthy,hamburguer
F,tofu,4,healthy,hamburguer
G,fish,10,healthy,hamburguer ];
Left Join(Table)
Temp:
Load item_id as item_id1,Food_name As Classifications,Food_Price as Food_Price1 Resident Table;