6 Replies Latest reply: Dec 19, 2012 4:40 AM by Nikolaos Kavroulakis RSS

    Reference line only for current year

      Hello friends,

       

      I want to make a horizontal reference line in my x axis for the currenr date only. The problem is that by using an expression like =num(month(Today())) and having the month numbers on x-axis i create a reference line for all my years an not only the current....I have also tried =Year(Today()) expression in conditional but does not seem to work.Any ideas???

       

      Thank you in advance

        • Re: Reference line only for current year

          At least can anyone tell me if i have date format like : 1- 2009
                                                                                        2- 2009

                                                                                         ...........

          in x-axis is there any way to put in a reference line??? There is  a restriction of all the x-axis values to be numeric so

          what can i do.????

          I tried the expression =num(month(Today())) + num(Year(Today())) but with no success....

          • Re: Reference line only for current year
            Rebecca Molstad

            For you rfirst question, create a variable for your expression and then reference the variable.  This way it will only equal one data point. For the second, I am not very clear on what you need. Can you upload a sample?

              • Re: Reference line only for current year

                For the first question I made the variable vTODAY = date(today(),'YYYY-MM') is there any way to compare dates?? For example 2012-1>2013-1.I tried =if(date(b.TestMonthYear)<date(vTODAY),sum(b.QtyInvoiced),sum(b.ForecastQty))  but doesnot seem to work .

                I also tried =if( 'b.TestMonthYear' < 'vTODAY', sum(b.QtyInvoiced),sum(b.ForecastQty)) which gives all correct results appart from the year 2013 when it gives 0.

                 

                 

                For the second question in this particular case the x-axis will contain the dimention Date which will have the format 1-2012,2-2012...1-2013...etc ....but there is a restriction in reference lines refering to the x-axis which contain continuous numeric values so can i implement that...

                  • Re: Reference line only for current year
                    Rebecca Molstad

                    See if this is what you are looking for.  I used max(Date) for my date instead of Today(), just because I don't have data through today, but you could change that to suit your needs.

                      • Re: Reference line only for current year

                        Hi there rebeccad and thanks for your help,

                         

                        This is not what i am looking for but fortunately i can explain whan i need with an example that was made by you.

                        What i want is the  same thing as demonstraden in your double line example but the period format will be like 2012-1.

                        You can notice that the actual is zero when i am in 2013 and i have forecast quantity but thats not correct the actual should equal

                        with the forcast value.I used the expressions mentioned in my earlier post in order to make it work but no luck. Oh one other thing the

                        reference line should be vertical and indicate todays date.....Thats all i hope you can help

                         

                        Regards,

                         

                        Nikolaos Kavroulakis

                          • Re: Reference line only for current year

                            I manage to implement the first part of my question by using the expression =if( SubField(b.TestMonthYear,'-',1) <= SubField(vTODAY,'-',1),if(SubField(b.TestMonthYear,'-',2) < SubField(vTODAY,'-',2),sum(b.QtyInvoiced),sum(b.ForecastQty)) ,sum(b.ForecastQty)) although i do not

                            realise what was the problem,propable something with date comparison...

                            Refering to the vertical reference line is it possible to put it in without having continuous numeric filed in x-axis but having date format like 2012-12???