Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mellerbeck
Creator II
Creator II

Multicolored stacked bar graph, color based on date

Hi smart people out there so assuming we have a data set of five records

caseid          created

27310          2011-05-15 12:03:27.303

27311          2011-05-21 11:04:27.230

27312          2011-05-22 11:05:22.456

27313          2011-05-25 11:03:21.250

27314          2033-05-26 12:03:22.555

I would like to create a stacked bargraph that displays items older than 10 days past in red, and the rest in green. So if today is june 2 2011=

27310, 27311, 27312 would be in red and 27313 and 27314 would be stacked on top in green.

Possible? Thanks for any help or clues!

3 Replies
Not applicable

Hi there!

Not sure if u r still looking for help with this but just in case u r, I have attached a file with my solution.

LOAD * INLINE [

caseid, created

27310,2011-05-15

27311,2011-05-21

27312,2011-05-22

27313,2011-05-25

27314,2033-05-26];

This setting should color bars RED if they are ON OR BEFORE 40688 (5/25/2011):

Chart Properties >>Expressions>>Background Color>>if(created>=40688,RGB(300,0,0),RGB(0,300,0))

This setting should send caseid created LATER to TOP of chart:

Chart Properties >>Sort>> Sort by>> Y-value (Descending)

This setting should help show "X" axis labels more correctly:

Chart Properties >>Axes>>Expression Axes>>Forced 0 (s/b UNCHECKED)

I am a novice just trying to give back to the community.

Hope this helps!

Not applicable

here is an example ...

Not applicable

OOPS!

Had my colors switched...

Had  if(created>=40688,RGB(300,0,0),RGB(0,300,0))

Should have been  if(created>=40688,RGB(0,300,0),RGB(300,0,0))