Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The aim is to have a scatterbox where the color of the bubbles represent the progress in time, which is the dimension of the scatterbox.
I creates the colorcoding in a simple table (see attached example) with
=ColorMix1((TimeGroup-Min (Total TimeGroup))/ (
Max( Total TimeGroup)-Min (Total TimeGroup)), lightgray(), blue())
but I wonder where to add this expression or which other way there is to define the color based on the value of the dimension. I did put it into the expression of the background color of field 2 but it did not work.
I attached an example with a scatterplot and a simple table and the result I would like to achieve is getting bubbles the same color as the background of the simple table.I want this color code just for this single diagram and there can be quite a lot of bubbles.
Any help is greatly appreciated.
Andreas
Maybe like attached?
Maybe like attached?
Stefan,
Lightning-fast and exactly what I wanted.
Thanks!
Why did my version work with the straight table but not with the scatterbox?
I changed to things:
- Put the background color expression into the first expression (X)
[I think this was the change that made it work]
- I've used Getcurrentfield() to retrieve the current dimension from the dimension group, so the coloring works also when changing dimension
Thanks Stefan,
I digged more into your solution and wondered why it does not work with a date format like
'W' & Week([Date]) & '-' & Year([Date]) as TotalWeeks?
My first thought was that this is because Week() has not the granularity to determine a value but then WeekStart() should work what it does not.
! attached a new version of the example with the change in the TimeGroup.
Best
Andreas
This TotalWeeks calculation returns a text and the colormix() function needs numbers to calculate the numeric value for the color mapping.
Something like
Dual('W' & Week([Date])& '-' &Year([Date]), Weekstart(Date)) as TotalWeeks