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?
![marcodelgrosso_1-1657794047003.png marcodelgrosso_1-1657794047003.png](https://community.qlik.com/t5/image/serverpage/image-id/84164iD0F4D92E723D1D98/image-size/medium?v=v2&px=400)