7 Replies Latest reply on Feb 4, 2019 9:19 AM by Michel Caissie

# Is it possible to dynamically change the center value on a diverging color palette to be the median of whatever measure is being used?

I have created a heat map with the temperature diverging color palette. From a parameter the user is allowed to select from several measures to be displayed. Because some of the measures have extreme outliers I am looking for a way to dynamically set the center value for the diverging color palette to be the median of whatever measure is selected.

• ###### 1. Re: Is it possible to dynamically change the center value on a diverging color palette to be the median of whatever measure is being used?

Matt,

Did you try putting a calculated field returning the selected measure on the color shelf ?

Michel

• ###### 2. Re: Is it possible to dynamically change the center value on a diverging color palette to be the median of whatever measure is being used?

Hi,

I can get the color to change, but what I'm trying to do is affect the scale that is created by the palette.So in your example, if you edit the color palette and select the advanced window, then you see the center value set to 767,732.325. I want to be able to alter that center value with a calculation.

• ###### 3. Re: Is it possible to dynamically change the center value on a diverging color palette to be the median of whatever measure is being used?

Yep, i checked to fast.

But I see that if the measures have negative values the center is always 0 , so you could make a calculation that shift all values, in order for the median to become 0 and everything below it negative.

SUM( [Sales] ) - WINDOW_MEDIAN( SUM( [Sales] ) )   (compute using table across then down)

2 of 2 people found this helpful
• ###### 4. Re: Is it possible to dynamically change the center value on a diverging color palette to be the median of whatever measure is being used?

Ok, thanks. I'll try that one.

• ###### 5. Re: Is it possible to dynamically change the center value on a diverging color palette to be the median of whatever measure is being used?

Thanks Michel! The solution you provided worked perfectly. You saved my day

• ###### 6. Re: Is it possible to dynamically change the center value on a diverging color palette to be the median of whatever measure is being used?

This then changes the high and low in the legend...how do you fix that?

• ###### 7. Re: Is it possible to dynamically change the center value on a diverging color palette to be the median of whatever measure is being used?

Alyssa,

You can make 2 sheets,  one with the right legend colors,  and one with the right legend boundary values.

Bring both sheet on a dashboard,  overlap the two legends to display the right values and the right colors, and hide the unwanted sheet.