Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression to show satisfaction scores

Hi,

On our current application trying to assign a colour to each possible satisfaction score on a map. Scores range from 1 - 10. Put the following in the expression which doesnt work:

=If([Q1.1 The way your call was handled when you reported the problem (1-10)])='10','#FF0000'

=If(
[Q1.1 The way your call was handled when you reported the problem (1-10)])='9','#0000FF'

=If(
[Q1.1 The way your call was handled when you reported the problem (1-10)])='8','#FFFF00'

=If(
[Q1.1 The way your call was handled when you reported the problem (1-10)])='7','#008000'

Can anybody help? Also, like to replicaterthis for every satisfaction question we view. You will see there is approximtaley 10 questions so it is possible that whichever question you select same colour parameters are applied to it?

Does anyomne know why some of the dots are bigger than others?

Any help would be greatly appreciated.

Chris


2 Replies
Gysbert_Wassenaar

You need to nest the if statements and make sure all the parentheses match:

=If([Q1.1 The way your call was handled when you reported the problem (1-10)]='10','#FF0000' ,
     If([Q1.1 The way your call was handled when you reported the problem (1-10)]='9','#0000FF',
        If([Q1.1 The way your call was handled when you reported the problem (1-10)]='8','#FFFF00',
          If([Q1.1 The way your call was handled when you reported the problem (1-10)]='7','#008000' ))))

But it's better to create a colormap in the script. See this blog post for more information.


talk is cheap, supply exceeds demand
Not applicable
Author

Attached is a test equivalent of what were trying to do. You will see we have 7 questions, with scores differeing by the 5 customers on each question, i.e on Q1.1 it may be 7 out of 10, on 1.2 4 out of 10 etc. We wnat to the map, scores an colours to update as you flick through the questions.

Gysbert - indenting like you suggested worked. Each colour now has defined colour but as we want to look at different satisfaction questins we need the scores (-10) to be hard coded to a colour. It seems the blog Gysbert directed me suggests how to do this on an example of a chart butt is there any additonal help available?

Aplogies..very new to Qlikview.

Chris