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: 
SaturnV
Partner - Contributor III
Partner - Contributor III

Coloring the same table cells the same color

Is there a way to color the same values in a column the same color?
I have about 1000 different values and the same value occurs more than once in this table.

So I will not use an if here like "if (Status='Service', red())". Because I have many different, dynamic values. It should just color same values the same color to group it and make a better overview.

Can't find any solution...

 

Best regards

Julian

Labels (3)
2 Solutions

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Are the values dimensions -- ie fixed values -- or measure calculated values?

-Rob

View solution in original post

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I'll use the field CategoryName instated of Status to demonstrate.

If you want to use a single color for all duplicate values:

if(Count(total<CategoryName> CategoryName) > 1, blue())

If you want each duplicate CategoryName to use a different color. 

if(Count(total<CategoryName> CategoryName) > 1, Color(FieldIndex('CategoryName', CategoryName)))

The color() function will only return 20 values and will calculate values > 20 as Mod(n, 20).  So you will get some repeating colors with 1000 values  unless you come up with some other coloring scheme. But this should get you started. 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Are the values dimensions -- ie fixed values -- or measure calculated values?

-Rob

SaturnV
Partner - Contributor III
Partner - Contributor III
Author

Hey Rob,

 the values are dimensions.

Best,

Julian

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I'll use the field CategoryName instated of Status to demonstrate.

If you want to use a single color for all duplicate values:

if(Count(total<CategoryName> CategoryName) > 1, blue())

If you want each duplicate CategoryName to use a different color. 

if(Count(total<CategoryName> CategoryName) > 1, Color(FieldIndex('CategoryName', CategoryName)))

The color() function will only return 20 values and will calculate values > 20 as Mod(n, 20).  So you will get some repeating colors with 1000 values  unless you come up with some other coloring scheme. But this should get you started. 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com