Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

chart help needed

Hi,

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.

1 Solution

Accepted Solutions
Employee
Employee

Re: Re: Re: chart help needed

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

12 Replies
Employee
Employee

Re: chart help needed

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)) ))

Not applicable

Re: chart help needed

Hi Jonathan,

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.

Thanks,

Employee
Employee

Re: chart help needed

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 !

Not applicable

Re: chart help needed

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.

Not applicable

Re: chart help needed

Hi Jonathan,

Sorry, I have not mentioned my requirement clearly,

Example  i need 3 colors in 1 days Example i have data like this

2361, -4, 11/09/2014
2362, -20, 11/09/2014
2363, 25, 11/09/2014
2364, 0, 11/09/2014

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.

Not applicable

Re: chart help needed

Bar length is Zero to color up. So obviously you cant see.

Thank you

Suraj

Not applicable

Re: Re: chart help needed

Hi Suraj,

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.

Thanks,

Not applicable

Re: Re: chart help needed

Hi Jonthan,

Any help?

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.

Thanks,

Not applicable

Re: Re: chart help needed

Can any one help?

Community Browser