I have to implement a functionality where I have to change the font color based on targets specified in excel sheet. For each product there are different targets and operators for which different font colors have been specified.
I needs to show different font color of sales according to provided excel sheet. I have attached the qvw file and configurable excel sheet.
Please check the text color of Sales expression. It is not working. After some investigation I found that the Operator1, Color1 etc are coming as a text from excel sheet that's why it is not working. Is there any other way to achieve this functionality.
Unforunately, I am running a personal edition, so couldn't open your QVW file but based on what I understood from your description I think that you are looking for a conditional color formatting of the text which in your case is the "target".
Assuming that you are displaying the sales target in a table, you can set different conditional colors by going to the Expressions tab in the table properties. Simply expand the expression and you will see the option "Text Color". Click "Text Color" and enter the conditional expression in the "Definition" area. The expression should be something like this:
Thank you very much for your reply but this is not what I am looking for. I want to take the operator ('<' or '>' or '>=' or '<=') directly from excel sheet and create the if clause in expression similar as you have created. This can be achieved using variables, but I can't create variables for each product as product may be 100 or 200 and user can specify different operator for each product.
I think I understand what you are trying to do, but the Excel file is difficult to interpret into a dynamic Qlikview expression (for example, no between operator). It looks like you are trying to colour products according to low/medium/high bands with different limits for each product.
The way I handle something like this is to use Class or Interval match to 'band' the values, and then colour the results based on the class or interval band. You could use the extended interval match syntax to get product specific banding
The spreadsheet would contain the fields: Product, Low, High