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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sergio0592
Specialist III
Specialist III

Color in stacked bar

Hi all,

I can't manage the following issue. I have a stacked bar chart with two dimensions dim1 and dim2. Dim2 has the values : RED/GREEN/YELLOW/GREY.

So when Dim2=RED, i want background color is red. It works only for some cases but not for all. I use a table color (which usually fix the issue) and as background color :

=color or =only({<Dim1>}color) but both don't works.

P1.jpg

Any idea?

Thanks

Labels (1)
1 Solution

Accepted Solutions
sergio0592
Specialist III
Specialist III
Author

I manage to fix it with trying reproducing in a sample. Smiley Happy

As expression i have a cumulative sum of sales with =

sum({$<MONTH={"<=$(=num(MONTH))"}>} SALES)
/
sum({$<MONTH={"<=$(=num(MONTH))"}>} TOTAL <Dim1> SALES)

So it works if as background color i have = Only({<MONTH>}   color)

View solution in original post

3 Replies
hopkinsc
Partner - Specialist III
Partner - Specialist III

Hi, can you post an example?

sergio0592
Specialist III
Specialist III
Author

I can't manage to reproduce the issue on a sample for the moment.

sergio0592
Specialist III
Specialist III
Author

I manage to fix it with trying reproducing in a sample. Smiley Happy

As expression i have a cumulative sum of sales with =

sum({$<MONTH={"<=$(=num(MONTH))"}>} SALES)
/
sum({$<MONTH={"<=$(=num(MONTH))"}>} TOTAL <Dim1> SALES)

So it works if as background color i have = Only({<MONTH>}   color)