Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Color using GetCurrentField()

Hi,

I have a RGB set for one dimension, but I'm working on a Pie Chart with two dimensions. Now, If I set the expression color based on the RGB(R, G, B) when I drill-down in the group all the colors are gone (it looks black). How can I have the RGB for the first dimension and like random colors for the second one (can be the original ones).

I tried this expression:

If(GetCurrentField([Actividad-Oportunidad]) = 'Oportunidad', RGB(R, G, B), RGB(R * rand(), G * rand(), B * rand()))

But I didn't like the result.

Thanks in advance, kindest regards.

1 Solution

Accepted Solutions
Nicole-Smith

What about this instead:

If(GetCurrentField([Actividad-Oportunidad]) = 'Oportunidad', RGB(R, G, B), RGB(255 * rand(), 255 * rand(), 255 * rand()))

View solution in original post

2 Replies
Nicole-Smith

What about this instead:

If(GetCurrentField([Actividad-Oportunidad]) = 'Oportunidad', RGB(R, G, B), RGB(255 * rand(), 255 * rand(), 255 * rand()))

Anonymous
Not applicable
Author

Thanks!!! that worked better!