How to create a calculated field which groups a group in a scatter plot

I have a scatter plot which has X-Axis date, Y-Axis count of item, and have a calculated field which groups the data items into the following:

Vegetable (Blue)
Fruit (Red)
Other (Grey)

What i then want to do is then have the shade of the color change based on the actual fruit.

However i have coded my fruits / vegetables into alphabetic characters

Apple being ‘A’, Banana ‘B’, Carrot ‘C’, and so on.
So it should then group these into Apple (maybe dark red), Banana (another shade of red), Carrot (a shade of Blue) and so on for the rest of the fruit/vegetables

If this is not possible in one scatter plot, I’d assume i would make a new one where it only shows fruits, but then have those scattered by date, by shade of color based on code assigned to the name.
And then i would do the same for vegetables.

I would ignore “Other” since i do not need this information to be displayed.

Is this possible?

Hello @HarveyB-B, if you are wanting to only determine the color based on the fruit or vegetable response then you will want that field in the color field well and not the one that determines if it is a fruit or vegetable. You may want to create a new scatter plot like you suggested if switching the color field well for your current use case doesn’t work.

Maybe send some screenshots of how you are building that out scatter plot so I can give more information if you decide against creating another visual.

@HarveyB-B -
did @DylanM 's suggestion for color variable solve your issue? If not, please provide the screenshots of how you are building out the scatterplot. Thanks!

1 Like