Forum Discussion

naitiksoni's avatar
naitiksoni
Regular Visitor
9 years ago
Solved

Reference Line on x-axis

I have date on my x-axis of a Line chart. I need a vertical reference line on a particular (dynamic) date to see if my trend line crossed that date or not.   Thanks.
  • BhaveshPatel's avatar
    9 years ago

    Hi naitiksoni

     

    To draw the Vertical reference line is currently not possible. You can use bit of trick though. Use Shapes to create a static vertical line and it is not dynamic as explained. See the attached screenshot.

     

  • v-yulgu-msft's avatar
    9 years ago

    Hi naitiksoni,

     

    A vertical reference line is not available now. To work around this requirement, you can try to use a combination chart.

    1. Create a "line and stacked column chart"
    2. Put column [date] into shared axis and put [values] into line values.
    3. Create a measure that evaluates to the maximum value when Date=specific date(otherwise blank), put this measure into column values.

    Measures can be:

    Reference line =
        IF (
            HASONEVALUE ( Table1[Date] ),
            IF (
                VALUES ( Table1[Date] ) = DATE ( 2016, 3, 1 ),
                MAXX ( ALL ( Table1[Date] ), MAX ( Table1[Sales] ) )
            )
        )

     

    Thanks,
    Yuliana Gu