Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Bobi
Partner - Contributor II
Partner - Contributor II

Coloring scatterplot.

Hi. I am sitting with a task where I want to color a scatterplot with a gradient from green to red. How do i do this in the easiest way? Can I use a colormix1 function and maybe save it as a mastermeasure? Dont find any ways to do colorcoding  in masterdim/measures yet..

 

The plot is income on y-axis and cost on x-axis. I want the dots to be greener the higher income compared to cost and then more red when it will be larger cost compared to income.

Labels (1)
1 Reply
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi Bobi

1. Go to Appearance and then to colors and legend and unselect the custom option.

2. Select "By expression" from the drop-down menu.

3. Type the below expression

         =IF(Sum(Income) >Sum(Cost),Green(),Red())

4. check the color by expression option.

Hope this works for u.

 

Thanks

Thanks and Regards
Kashyap.R