1 Reply Latest reply: Oct 23, 2017 9:57 AM by Felip Drechsler RSS

    Reference Line by Dimension

    Agrim Sharma

      Hi All,

       

      I am using Qlik Sense, want to draw a vertical line showing Current month on this graph, can anyone help?

       

      Reference.PNG

       

      like this:-

      Referenceline.PNG

       

      Regards,

      Agreim

        • Re: Reference Line by Dimension
          Felip Drechsler

          Hi Agrim,

           

          You can't put a straight vertical line directly in Qlik Sense, you'd have to use a workaround with your data on it.

          As an example, using the code bellow:

           

          data:

          load * inline

          [

          A,B

              10/23/2017,100

              10/24/2017,101

              10/25/2017,105

              10/26/2017,195  

              10/01/2017,1

              01/01/2017,100

              01/02/2017,200  

          ];

           

          test:

          load

              max(B) as maxValue

          Resident data;

           

          left join (data)

          load

          Today() as A,

              maxValue as C

          Resident test;

           

          drop table test;

           

          Will get the reference line based on today's date and gets the max value from your dataset so that you can create a combo chart, having the lines as you have on your images, and an additional expression with a bar, that would be your reference line, giving the following result.

          Sample.png

           

          Adding more data to it, you'll get something like:

          Sample.png

           

          Hope it helps.

           

          Attached is the sample QVF file aslo.

           

          Felipe. !