7 Replies Latest reply: Mar 22, 2017 8:42 AM by Or Daniel RSS

    To get consistent colors for same options

      I am preparing a chart to show the count of responses against a couple of survey questions.


      One question, named Q_23 is like "whats your rating on the performance" . The answer to the question is meant to be anything from 0 to 10.

      The answer feild [Response] contains values other than 0 to 10 also (that pertains to other questions which has response like probably, always, never etc)


      Ideally the Q_23 chat should be displayed as shown here..(and for me it does display like this when there is no selection)



      Now the problem happens when I select few filters. When there are no values for a few options, it disappears and show something like


      This is totally unacceptable as the color coding (red for the worst and green for the best) totaly disobeys.


      As a solution , I thought of two options

      1) the legend should show all the 11 options even if there is no value against that. I hope, if I can achieve this, the color code will be followed.

      2) there should be some mechanism to map each color to each option so that even if few options are not there, the options that are present will be shown in their correct color.


      To try out my first option, I tried going to 'dimensions' tab and uncheck 'suppress null values', check 'show all values' ..then went to 'presentation tab' and checked 'show zero on bars' . this is not helping me and the result is the same as above.


      The dimension I gave is a calculated dimension as given below ..(I have done so because else the other response values like 'always', 'probably' etc will appear in legend when I check the 'show all values' in dimensions tab)


      Calculated dimension : =if([Response]='0-Worst possible' or [Response]='1' or [Response]='2' or [Response]='3' or [Response]='4' or [Response]='5' or [Response]='6' or [Response]='7' or [Response]='8' or [Response]='9' or [Response]='10-Best possible',[Response])


      The expression : Count({<Question={'Q_23'}>}[Response])


      Regarding 2nd option, that is the possibility of mapping colors to the 11 options, I dont have a slightest clue if this is possible and how.


      This could be a very simple problem..I anticipate any experienced qlikview friend to help me out soon.