Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
G3S
Creator III
Creator III

Please explain this function

hi,

I was looking to do heatmaps and found this video.
https://www.youtube.com/watch?v=P3hmHiUfxPM

the function shown there is the following (I have changed the colours to what I need): 

=ColorMix2(
(hrank(total column(1))/(NoOfColumns(total)/2))-1,
rgb(255,102,102) // colour for max
rgb(76,101,0) // colour for min
rgb(255,255,153) // colour for middle
)

Appreciate if someone can clarify the section in blue. I am not understanding why it is being divided by 2 and then minus 1. 

thank you in advance

Labels (3)
2 Replies
ajaykakkar93
Specialist III
Specialist III

Hi,

NoOfColumns() function returns the number of columns in a pivot table's current row segmentThe ColumnNo and NoOfColumns functions are only relevant to pivot tables.

Alternate link : https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Sense-Color-Range-Theme-Approach/ta-p/149102...

This formula assigns a value in the range of -1 to +1 as required for the 3 color approach based on your expression identified in column(1) of the dataset. I.e. the second field of your dataset which is typically the first measure after a single dimension field.

 

ill follow the post for more clarity from others also 

 

 

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

G3S
Creator III
Creator III
Author

Thank you. what is the purpose of dividing by two?