1 Reply Latest reply on Apr 7, 2014 11:31 PM by Tracy Rodgers

    Reference Line for Current Date on a Dual Axis Chart?

    Dan Kirk



      I am trying to insert a reference line for the current date onto a line chart with running totals by date. This is simple enough to do using a calculated field for "today" as described here. The problem I am having is once I display more than one line with each representing the running total for a year, I can no longer have the reference line. I think that I understand why this is happening... because the xy axis is plotting the running totals for month and day only, whereas the reference line for "today's" date needs to have a month, day and year.


      My current chart with some test data is below. How can I insert a reference line for today's date when the chart is plotting multiple years?




        • 1. Re: Reference Line for Current Date on a Dual Axis Chart?
          Tracy Rodgers

          Hi Dan,


          One way you could do this--though admittedly is a bit of hack could be the following.


          1. Create a calculated field similar to the following:


          if [Today]=[DT_RECEIPT_DATE] then 'Today' end


          2. Place sum(Total) next to the running_sum of Total on the Rows shelf. Right click and create a dual axis.


          3. On the marks card, change the Sum(Total) to a bar and place the above calculation on the color shelf (be sure to remove anything else from this marks card).


          4. On the color legend, right click on null and select 'Hide.'


          Hope this helps! I've attached your workbook here with the example (the calculation is a little more complex since [DT_RECEIPT_DATE] did not have today's date).