I am trying to change the color of one of the bars of my barplot without success. I am uploading a sample app to facilitate help from Qlik Sense comunity colleagues. It is well documented in this forum how to do it in more simple types of graphs (color by expression - QlikSense). It is done going to the "Appearance" tab, then clicking in "Colors and Legend", and changing the tab "Colors Custom" from "Auto" to "By Expression". Then in the "Fx" field entering: if(Date> '05.05.17' and Date< '13.05.17', Red(), Green()) for example. As below in my illustration:
Now, I have a more complicated chart where users enter dates through 6 variable extensions in the app ("BeforeMin", "BeforeMax", "DuringMin", "DuringMax", "AfterMin", and "AfterMax"). And a barplot with 3 periods is created: "Before", "During", "After". The dimension is created with the following expression:
The values I entered in each empty space of the Varaibles Extension boxes were:
BeforeMin = 02.05.17
BeforeMax = 03.05.17
DuringMin = 04.05.17
DuringMax = 05.05.17
AfterMin = 06.05.17
AfterMax = 07.05.17
What I want is painting the bar of the middle (the one that receives the name "During") red, and the others green; but had no success. Have tried going to: >Appearance, >Colors, >By Expression; and entering;
I do not understand what do you mean by changing my variables to numeric, and what is its goal. Could you please widen a little bit on what it is required and why should I do this change? Maybe changing "Before", "During", "After" to 1, 2, 3? Or maybe eliminating the simple quote from the dates ('DD.MM.YY' to DD.MM.YY)?
How would you write the final expression on "Appearance" to change the color on the "During" bar with your suggested change?
Yes. I am uploading a Qlik App that I created exclusively to solve this question. I will edit my question and adapt it to my sample app. The goal is still the same: converting the color of the "During" bar to red for example, and leaving the other 2 ("Before" and "After" on color green).
In order to watch correctly the graphic please type the following values in each of the 6 empty spaces of the boxes of Variable Extension at the top of the app: