Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

eab-pwc_dk
New Contributor

Color by expression

Hi,

I was wondering whether you guys knew how to color data in bar charts different colors depending on which sheet the data comes from.

For example would i like to color data in a bar chart from sheet1 Yellow and data from sheet1-1 gray.

6 Replies
YoussefBelloum
Esteemed Contributor

Re: Color by expression

Hi,

you should go the properties of each object, choose customized colors and color by expression:

barchart.png

and on the expression part, you can use RGB() function, to set differents colors on each barchart object

MVP
MVP

Re: Color by expression

Are you talking about a sheet in Qlik Sense or a sheet in an Excel workbook?

Qlik Sense does not organize it's data in the data model by sheet like Excel does. So any sheet in Qlik Sense can use the same data model - the entire data model.

eab-pwc_dk
New Contributor

Re: Color by expression

I'm talking about two different excel sheets

YoussefBelloum
Esteemed Contributor

Re: Color by expression

You can create flags on the tables load like this:

Table1:

load

.

'Sheet1' as Flag,

.

From ...Sheet1...

after you can do what i have mentioned above, like this:

if(Flag='Sheet1', rgb(X,X,X) ) on the coloring expression

eab-pwc_dk
New Contributor

Re: Color by expression

Where do i create flags ?

YoussefBelloum
Esteemed Contributor

Re: Color by expression

on the script, on the Load part

is it clear ?

Community Browser