Search code examples
heatmaptableau-apilogarithm

Size the Tableau Heat Map Logarithmically


I just realized you can plot x by y using logarithmic scale, i.e, x is time, and y is logarithmic scale

enter image description here

How do I adjust size of Heat Map to have logarithmic scale. Here is a heat map. Size is based on number of records

Note how 1 record and 600 records have same size

enter image description here

Here is size legend ----- how to fix?

enter image description here

Logs

Before, most boxes were same size, with few exceptions

enter image description here

When I create calculated field to get log and convert to distrete, i.e.

enter image description here

I move it to size shelf.

All boxes are same size .... please advise

enter image description here


Solution

  • You could simply plot Log(Sum([Number of Records])) or Ln(Sum([Number of Records])).

    To make it even easier to distinguish, you could make a discrete field by:

    1. Creating a calculated field log_recs = Log(Sum([Number of Records]))
    2. Creating a bin field based on log_recs with a bin size of 1

    (or even simpler, skipping step 2 by wrapping the Log() call with a Floor() or Int() call) Be sure to set the field to be discrete in this case.

    Then if you put your log_recs_bin field on the size shelf, you should get 4 or 5 discrete sizes, one for each order of magnitude.

    Edited to call Sum() prior to calling Log()