Forum Discussion

TomJWhite's avatar
TomJWhite
Frequent Visitor
5 years ago
Solved

Mark key dates in area chart

Hello there

 

I have a set of data which contains viewing activity for a Netflix account and im wanting to chart that with markers indicating key dates in 2020 regarding lockdowns where I am. 

 

I have done this in a rough manner manually with shapes and text boxes, but is there a way to do is in a more elegant way that makes the markers part of the visual itself? These arent dynamic and I dont see this method working on Power BI service etc either.

 

 

Let me know if I need to upload anything from the dataset etc but im hoping this is just a case of me being bad at googling and the solution is straightforward.

  • Hi, TomJWhite 

     

    You can create a column and use it in legend, and note that It’s best not to have the same name, or it will connect.

    Like this:

     

    Main Date = 
    SWITCH (
        TRUE (),
        'Table'[Date] = DATE ( 2021, 3, 23 ), "First Lockdown begins",
        'Table'[Date] = DATE ( 2021, 5, 13 ), "Move to Level 2",
        'Table'[Date] = DATE ( 2021, 6, 9 ), "Move to Level 1",
        'Table'[Date] = DATE ( 2021, 8, 30 ), "Move to Level 2 again",
        'Table'[Date] = DATE ( 2021, 8, 12 ), "Second Lockdown begins",
        " "
    )

     

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please feel free to ask me.


    Best Regards,

    Community Support Team _ Janey

3 Replies

  • TomJWhite , You can have lockdown dates marked in your calendar and then create a measure for those. and for that measure use markers?

    • TomJWhite's avatar
      TomJWhite
      Frequent Visitor

      Hi amitchandak, Im not sure what you mean by 'your calendar' sorry. Each entry in my dataset has a field called "Start Date" which is a 'Date' column, but this is not a complete calendar of 2020, only dates which appear as part of an entry exist (e.g there is no February 24th 2020 because Netflix wasnt used on that account that day). Thats the column im using for Axis. 

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Community Support

    Hi, TomJWhite 

     

    You can create a column and use it in legend, and note that It’s best not to have the same name, or it will connect.

    Like this:

     

    Main Date = 
    SWITCH (
        TRUE (),
        'Table'[Date] = DATE ( 2021, 3, 23 ), "First Lockdown begins",
        'Table'[Date] = DATE ( 2021, 5, 13 ), "Move to Level 2",
        'Table'[Date] = DATE ( 2021, 6, 9 ), "Move to Level 1",
        'Table'[Date] = DATE ( 2021, 8, 30 ), "Move to Level 2 again",
        'Table'[Date] = DATE ( 2021, 8, 12 ), "Second Lockdown begins",
        " "
    )

     

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please feel free to ask me.


    Best Regards,

    Community Support Team _ Janey