Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Colormix on Pivot table (multiple expressions)

Hi everyone.

I needed assistance using colormix on a pivot table where the generated heat map fills in the colors horizontally across the Year dim found at the top. I can get colormix to work on a column vertically but could not find a setting to make it switch to calculating horizontally. Do I need to manually edit the generated code or is there another way to accomplish this?

Please refer to attached images. First shows it not working and in the latter I created it in excel to mimic what I required.

If you had a sample qvw that would really help. Would appreciate your assistance.

Thank you.

Colormix Pivot Table.JPG.jpg

Colormix Excel.JPG.jpg

14 Replies
Not applicable
Author

Hi Jagan!

Thank you for this.

Let me try it and revert...

Not applicable
Author

Thanks Jagan.

I think I just need to amend this slightly so three colours can be produced (red, amber, green).

Thank you.

Not applicable
Author

Thanks Jagan.

I think I just need to amend this slightly so three colours can be produced (red, amber, green).

Thank you.

camilo
Contributor III
Contributor III

Hi Jagan,

Is there any way of not fixing the color of the first row?

You used this expression:

=If(RowNo() = 1, RGB(255, 0, 0)

If([Sales] <= vAvgYearlySales, RGB(1* ([Sales]/1000), 0,0), RGB(0, 1* ([Sales]/1000), 0)))

If I delette the bold section, hopping to free the color of the first row  QV pop up an error about exceeding the asigned memory...

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=If(RowNo() = 1, RGB(255, 255, 255),

If([Sales] <= vAvgYearlySales, RGB(1* ([Sales]/1000), 0,0), RGB(0, 1* ([Sales]/1000), 0)))

RGB(255, 255, 255) - White the default color


Regards,

Jagan.