Vizlib Home Try Vizlib

Heatmap - Comparing value of cell with average value of entire row

I have a VizLib heatmap chart  with N elements and M items (as in the attached image). I'm trying to color  every single cell comparing its value with the average of values of entire row (average of the all items value relative to the element).

I tried to put in the color function the following formula:


if (Sum ( { < date= {"$(=max(date))"} > } value) > Avg( { < date= {"$(=max(date))"} > } value), '#80CBC3')


I've also tried to create one item for each element which contains the average value and then to put the following formula:


if (Sum ( { < date= {"$(=max(date))"} > } value) > Sum ( { < item= {"$(='Item_Avg')"}, date= {"$(=max(date))"} > } value), '#80CBC3')


Both of them don't work, can you help me?


  • Hi Marco
    Here is a demo app with our recommendation to help achieve the heatmap coloring.
    You can use an Expression like : if( sum(Sales)<=sum(total <CategoryName> Sales)/count(distinct total <CategoryName> SalesOffice),'#ff0000')

Login to post a comment