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?