8 Replies Latest reply: Jun 13, 2012 5:46 AM by macsigarev RSS

    Curve chart in qlikview

      Hi the community,

       

      My purpose is to display 2 curves in the same chart according .

      I have one dimension witch is the date going from january to december(in a monthly basis: 01/01/2011;01/02/2011......01/12/2011). Each curve should represent a specific year, 1 curve for 2011 and 1 curve for 2012.

       

      I tried to display the 2 curves in the same chart using 2 expressions (1 expression for each curve) but the problem is that i have the 1st curve (for 2011) followed by the second curve (for 2012). what i want is to have the 2 curves starting from the same origin (january). see the attached snapshot

       

      How can i solve this problem ??

       

      thank you

       

      Best regards

        • Re: Curve chart in qlikview
          Deepak Kurup

          HI,

           

          The issue is because you are trying to add the date field. Add the month field and you will get the desired output.

           

          Month(Date) as Month

           

           

           

           

          Deepak

            • Re: Curve chart in qlikview

              Thanks you for the answer Deepak,

               

              But you mean at the load table step in the script editor ? or at the graphic properties step?

               

               

              regards

                • Re: Curve chart in qlikview
                  Deepak Kurup

                  hi,

                   

                  In the load script itself and then add the month as dimension. For testing purpose yu can add it in the graphic properties and check

                   

                   

                   

                  Deepak

                  • Re: Curve chart in qlikview

                    Hi Deepak,

                     

                    I tried what you said in the load step in the script editor and in the graph i have the message "no data to display".

                     

                    After troulebshooting, i understood it is because of the formulas used in the expressions.

                    In fact, for each expression (each represented by 1 curve), i have a "IF" statement as below:

                     

                    For 1st curve(2011 sales):

                    if(year(date)=2011), sum(sales))

                     

                    For 2st curve(2012 sales):

                    if(year(date)=2012), sum(sales))

                     

                    I assume that if a load only Month in the editor script QV could not perform the function YEAR() in the "IF" statement.

                     

                    Now what is your advice to have only the month dimension in the graph and be able to do the "IF" statement depending the year 2011 and 2012.

                     

                    thank you in advance