1
votes

I have Tableau table with few measures. I want my pallette to take place in every cell with value and leave cells with null values(blank) without color. The current situation is that null values are colored as 0 values. How can I distinct the nulls from the 0 values?

I tried to create calculated field but tableau doesn't allow to create calculated field on aggregations

2

2 Answers

2
votes

Create a calculated field [COLORSCALE YOUR FIELD] where the null-values are replaced by something off-scale. e.g. if your number range is between 0.0 and 100.0 you could use:

IIF(ISNULL([YOUR FIELD]),-100,[YOUR FIELD]*X)

Where X is a scaling factor. Adjust the scaling factor and the "Start"/"End" options in the "Color" Menue to suit your purpose.

1
votes

Another option based on mzunhammer's suggestion would be to use the min() function instead of assigning a hard coded value to replace the nulls, and may allow you to avoid the use of the scaling factor.

iif(isnull([Your Field]), min([Your Field])-y, [Your Field])

that way the null is always going to be y less than the lowest value even if the lowest values are changing as the dataset updates.