Discussion Board for collaboration on QlikView Scripting.
I have data in the qvw. I have to show bar chart based on the due days.
if days > 0 = red color in bar chart
if days = 0 = green color
if days < 0 purple colour on bar chart for that date
one day should show one line
can anybody help.
Go to Solution.
I switched the approach to count the IDs
You need 3 expressions each with their own background color
1st expression: count( if ( Duedays<0, ID)) ( background color: green())
2nd expression: count( if ( Duedays>0, ID)) ( background color: red())
3rd expression: count( if ( Duedays=0, ID)) ( background color: rgb(196,178,214))
and change the style of the chart to stack
also use 'DueDate' as the dimension
on the expression tab expand the + and enter the following for 'background color'
if ( Only (Duedays) > 0 , lightred(), if ( Only (Duedays) = 0 , green(), if( Only (Duedays) < 0, rgb(196,178,214)) ))
Thank you for your quick reply, in the above example it is not showing if days = 0 = green color remaining 2 conditions are working. If i select DueDays as '0' no preview is showing. Please help me.
on the presentation tab, uncheck 'supress zero values'
but.... since the bar will have a value of 0 it will have no height ! and you won't see any color !
May be because when 0 days, chart element is too small to be seen and also, even if you uncheck 'supress zero', you won't see the color, as there is 0 as value.
Sorry, I have not mentioned my requirement clearly,
Example i need 3 colors in 1 days Example i have data like this
In the above example i need to get 1 bar chart with different colors + value with purple -Ve vale with Red and 0 value with green.
Please help me. Thanks.
Bar length is Zero to color up. So obviously you cant see.
thank you for the reply.
I need bar on Count of the Records (if same date 5 records, e.g. 2 positive, 2 negative, 1 with zero; then the bar should show as below for that date). And the colour is based on due days.
Can any one help?