Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sundarakumar
Specialist II
Specialist II

Color Help

Hi All,

My requirement is to set the background color in a straight table. The background of the Dimenison or expression to be set with the RGB of the dimension itself.

Attached a sample app. comm_1.PNG

Creating a nested if is impossible since expecting lot of more entries.

Thanks is advance.

-Sundar

1 Solution

Accepted Solutions
Not applicable

There should be some other way. Working on that. Mean while below works for time being.

=RGB(SubField(KeepChar(RGB,'123456789,'),',',1),

SubField(KeepChar(RGB,'123456789,'),',',2),

SubField(KeepChar(RGB,'123456789,'),',',3))


Regards,

KKR

View solution in original post

11 Replies
Kushal_Chawda

How you gonna set the background color? is it based on some condition?

Anonymous
Not applicable

whey you click on the "#" sign at Dimension or Expression you

may define the textcolor to your likings

e.g. Expression textcolor rgb(255,128,128)

sundarakumar
Specialist II
Specialist II
Author

the dimension is iteself the color. I just want to set the dimension as the background color.

eg. 1st row - black, 2nd row - blue, thrid row - yellow, like wise...

I want the color of background to be dynamic in accordance with the dimension.

-Sundar

sundarakumar
Specialist II
Specialist II
Author

The text color or back ground color needs to be dynamic in accordance with the dimension.

Please refer to the attached sample app.

Anonymous
Not applicable

I donot see your attached app

what I did for a customer with a small masterdata Dimension (about 20 values)

I used an inline code where I attached for each value an own colour (rgb code)

then joined it to Dimension and thenI could use the colorfield in the Background Color field

I have no clue how to give each row another color

sundarakumar
Specialist II
Specialist II
Author

Sorry, my bad. Attached the app now. Please check , Am trying to replicate the same here, but looks like am missing something.

Please help.

-Sundar

Not applicable

There should be some other way. Working on that. Mean while below works for time being.

=RGB(SubField(KeepChar(RGB,'123456789,'),',',1),

SubField(KeepChar(RGB,'123456789,'),',',2),

SubField(KeepChar(RGB,'123456789,'),',',3))


Regards,

KKR

sundarakumar
Specialist II
Specialist II
Author

Great   Works like heaven Thanks a lot

-Sundar

sundarakumar
Specialist II
Specialist II
Author

Hi,

Need a 0 to be added to the string '1234456789,'.

Used an alternative shown below

Thanks again for the help

RGB(SubField(mid([Decimal Code(R,G,B)],2,len([Decimal Code(R,G,B)])-2),',',1),
SubField(mid([Decimal Code(R,G,B)],2,len([Decimal Code(R,G,B)])-2),',',2),
SubField(mid([Decimal Code(R,G,B)],2,len([Decimal Code(R,G,B)])-2),',',3))



-Sundar