Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color change for bar graph

Hi All,

I have attached the screen shots because i cannot copy the QVW file.

Dimension : =if(IsNum([Turnaround Time Network Days]), IF([Turnaround Time Network Days]>15, '16 + ', [Turnaround Time Network Days]),'Missing Dates')

Fact : Count([Turnaround Time RAG])

Colors of the bars should be GREEN AMBER and RED based on condition.


Condition : if ([Turnaround Time Network Days])>7, Red()

                     if ([Turnaround Time Network Days])<=3, Green()

                     if ([Turnaround Time Network Days])<=7, Amber()

I got the colors but the problem is if [Turnaround Time Network Days]>15 i have grouped into '16+' i want this bar to be in RED(). I am not able to do it. Please help me with this.

Check the screen shots.

Thanks & Regards,

Keerthi

27 Replies
sanketkhunte
Creator II
Creator II

IF(count([Turnaround Time Network Days])<15,Red())

Keerthi lets do one thing -:

Now with above expression we can set colors which are <15 and >15 right ? only the part remain 16 + we can set RED as default color in Color tab of chart so that it will automatically show in RED.

Sanket

Not applicable
Author

Yes i tried the same, but i am getting Missing dates also in red.

sanketkhunte
Creator II
Creator II

Lets do it by using flag in script :

do one this  write below statement in script

=if(IsNum([Turnaround Time Network Days]), IF([Turnaround Time Network Days]>15, 'Red','Any_other') as Color_Flag

after loading please provide me your qvw then i will provide my second solution for this.

Thanks

Sanket

manojkulkarni
Partner - Specialist II
Partner - Specialist II

Please attached application. I have created dimension while loading the data itself..

Not applicable
Author

if(IsNum([Turnaround Time Network Days]),

if([Turnaround Time Network Days]>7,Red(),

if([Turnaround Time Network Days]<=3, Green(),

if([Turnaround Time Network Days]<=7, Amber()

))))

Not applicable
Author

Please have a look on this attached qvw.

Not applicable
Author

HI Neha,

Thanks for ur time.

I got the expression :

=if (num([Turnaround Time Network Days])<=3, Green(),

if (num([Turnaround Time Network Days])<=7, RGB(255,126,0),

if (num([Turnaround Time Network Days])>7 , Yellow(),if (sum(num([Turnaround Time Network Days]))>15,red(),Black()))))

This works as per my requirement.

Thanks & Regards,

Keerthi

Not applicable
Author

Sanket i got the expression.

=if (num([Turnaround Time Network Days])<=3, Green(),

if (num([Turnaround Time Network Days])<=7, RGB(255,126,0),

if (num([Turnaround Time Network Days])>7 , Yellow(),if (sum(num([Turnaround Time Network Days]))>15,red(),Black()))))

This works as per my requirement.

Check the QVW

Thanks & Regards,

Keerthi