5 Replies Latest reply: Dec 7, 2012 6:57 AM by Jonathan Dienst RSS

    Text color of calculated dimension

      Hi all,

       

      I would like to change the text color of a value in a calculated dimension. The color change should be related to the dimension value and a variable. The variable could be changed by user by a input field. I tried the following in my expression for text color of the calculated dimension

       

      =if(num(sum(SalesAmount),'0,00') < v_Factor, RGB(100,0,0), RGB(0,200,0) )

       

      In this case my variable has the value 1.

       

      I do not understand the logic of qlikview, because some values greater than 1 are green, but some values less than 1 are green, too. And no value is red.

       

      Thanks a lot!

        • Re: Text color of calculated dimension
          mayilvahanan ramasamy

          HI

           

          Can you provide a sample file? Its useful for analysis the problem more detail

            • Re: Text color of calculated dimension

              Hi,

               

              I built a simple example. The condition for text color does not work and my variable has no effect.

               

              Thank you very much!

               

              Sort.qvw

                • Re: Text color of calculated dimension
                  Jonathan Dienst

                  Stephen

                   

                  The problem with using a calculated dimension is that the Aggr() expressions need to include all the chart dimensions, which is not possible with a calculated dimension. Your logic works correctly, but only for the first row - because the colour expression is missing the calculated dimension. If you select a value less than 85, the first row goes green as expected, but the colur expression is not computed for the other rows.

                   

                  I have attached a version which uses a calculated total and only the two dimensions Customer and Month. This works correctly.

                   

                  Regards

                  Jonathan

                    • Re: Text color of calculated dimension

                      Hi Jonathan,

                       

                      thanks al lot! Your example works fine, but I made a mistake in my example QVW.

                       

                      My QVW represented not the complete problem. I need to tell you why I use a calculated dimension. I use a calculated dimension because I need the result only one time. When I replace my calculated dimension with a normal expression, the I have the value in every column for every month. The result I need is to get only one column at the beginning of my pivot table. I hope you understand what I mean.

                       

                      I refreshed my example file.

                      So, my conculsion is, that is not possible to get both. A measure only shown as total and the value with different colors. Is this correct?

                       

                      Thanks

                       

                       

                       

                      Sort3.qvw