Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi -
I am trying to color the below bars by expression, trying to go off a set analysis:
IF(COUNT({< Date=, [Status]={'Value 1'}>}[Tag_ID])>= 20, vRed,vGreen) WHERE vRed and vGreen are color variables.
For some reason, this set analysis isn't working even though I wrote this expression under "Background Color" for the chart. Ideally, what I would like to see is two Red bars (since these numbers are above 50) and a green third bar. Right now they are all red and this is not right.
Any advice on this? The expression behind the bar chart itself is:
=COUNT({<Date=,[Status={'Value 1'}>}[Tag_ID])
Thanks for your help in advance!
Ricky
Since this was a mockup, I used this expression
=If(Sum(Tag_ID) >= 20, RGB(255,79,77), RGB(0,198,64))
Where my chart's expression is
=Sum(Tag_ID)
May be try this?
If(Count({<Date, [Status] = {'Value 1'}>} [Tag_ID]) >= 20, $(vRed), $(vGreen))
Just tried - didn't work By the way - the only reason I included the "Date=" in the color expression is because I have that in my original expression. I tried removing it from your solution and it still didn't work.
Do I need to include that part of the set analysis?
Can you show how exactly do you define vRed and vGreen?
vRed = RGB(255,79,77)
vGreen = RGB(0,198,64)
Just out of curiosity, does this work?
If(Count({<Date, [Status] = {'Value 1'}>} [Tag_ID]) >= 20, RGB(255,79,77), RGB(0,198,64))
No Perhaps you can share an example of bars within a chart colored by expression that I could use as a baseline?
Here is a very simple mock up for you
Do you have the expression behind this chart? For the general one and the background color. Thanks!
I'm working in Qlikview by the way.
You opened your thread in Qlik Sense forum that is what confused me... here is a QlikView sample and image