
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Color expression Green And Red - Stacked bar chart
Hi,
I'm new in Qlik sense a have a little problem with a bar chart.
I've only 2 variables : etat_dispo (disponibility of a car part equals to 0 or 1) & Part_name (Part Name)
Qlik clearly understand the data and show what i want but not in the good color !!!
But when i tried to make the color in green or red it's a total mess.
If(Aggr(Sum({<etat_dispo = {'1'}>} etat_dispo), part_name) > 0, Green(), Red())
That's show this without the notion of available and unavailable :
Someone have a clue please ? I would like to have the has the graph one but with red and green...
thanks,
Leo
- Subscribe by Topic:
-
Developers
-
expression
-
General Question
-
Qlik Sense
-
Set Analysis
-
Variables
-
Visualization

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, you can create a master item for each measure, set color for each master measure, use them in chart and select to use the library colores for measures.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @rubenmarin ,
Thanks for your answer, i already try this options.
I have 2 master measures :
- One for availability (when etat_dispo = 1)
-One for unavailability (when etat_dispo = 0)
You can find in attachments what that did when i put color by measure. As you can see, color are not working.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you can create a master item with the field etat_dispo.
Then, you can open the master item again and define the colors you want for each value in the panel 'value colors'.
Once you defined the defaut colors in the master item "Etat dispo", you can select "color by dimension" in your bar chart and select the dimension created above
You can also clik and drag the master item on the bar chart and select the proposition "color by : Etat dispo"
Hope it's clear
Nina

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Kingofghost33, instead of 'Par mesure' use 'multicolor' or 'unique color'.
'By measure' colors using the result of the expression selected, it depends of the value calculated, not the fixed color set to the measure.
Also, set the color on the 'edit measure' panel, not in the color 'segment color' panel.
