Power BI - Dynamic Reference Line on X-Axis

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024
  • Hey everybody! Parker here. Check out this interesting Power BI tutorial on how to create a vertical reference line on your x-axis in a line chart! This is very easy to set up and only takes a few minutes!
    Enroll in my introductory or advanced Power BI courses:
    training.bieli...
    Elite Power BI Consulting:
    bielite.com/
    Data Insights Tools:
    www.impktful.com/
    Connect with me on Twitter!
    / powerbielite

ความคิดเห็น • 31

  • @anastephania
    @anastephania ปีที่แล้ว

    Thank you for the tip!
    However, this is not working for me because I have two series that I am trying to display. :(
    I just need to add a line to show "when the pandemic started and another for when my program started).

  • @philjaenen4595
    @philjaenen4595 2 ปีที่แล้ว

    Question: Very usefull, thank. Is it possbile to set a line that changes and always show for previous workday or n-X workdays. Example: data is being update daily but is only accurate after certain workdays as people can still resolve issues. So reporting data should be n-2 or n-3. I want to add a vertical reference line that shows n-2 and/or n-3 workdays and so it changes over time

  • @mkrabbani7265
    @mkrabbani7265 4 ปีที่แล้ว +2

    How is your bar is so thin? I am searching for the option to set BAR (red your case) width to 1. But no luck!

    • @ericranger2775
      @ericranger2775 4 ปีที่แล้ว +3

      His bar is thin because he has lots of data on the x axis. There is no way to fix that

    • @spilledgraphics
      @spilledgraphics 3 ปีที่แล้ว

      Hi Mk, how much wider you want the bar to be? several days, like a range ? Or just one for a specific date ? You can try adjusting the code to using EndOfMonth and also putting on the x-axis of the chart this same field. Hope it works.

  • @sebastianbohn7629
    @sebastianbohn7629 4 ปีที่แล้ว +1

    Hey great video. Question though, have you applied something like this on a stacked bar chart? I would like to have a dynamic reference line on the x-axis that moves based on the slicer time frame. So if say 1 month is selected, then have the line at 160, two months then a line at 320 and so on.

  • @julioagh
    @julioagh 3 ปีที่แล้ว

    I really enjoy your video. Thanks. Actually how do you make posible to set your x axis with months without resuming data. In my x axis I can´t configure categorical or continuous even my datatype are datetimezone. Oh forgot to mention I´m using Dispersion Graph

  • @MarcoIllescasE
    @MarcoIllescasE 4 ปีที่แล้ว

    Thank you! Very elegant and efficient!!

  • @CarlitoAugust
    @CarlitoAugust 3 ปีที่แล้ว

    How you would use the max date in a column? let's say you want to add a dynamic reference based on the latest time when an item was installed? how do I match the dim_date in this scenario? example
    if ( Max('DIM_DATE'[DATE]) = Max('DeviceLog'[installDATE])
    ,XValue
    ,blank()
    )

  • @larrywarren9462
    @larrywarren9462 3 ปีที่แล้ว

    Hi, I have a report that is pulling rental income for properties and want to add a reference line that will indicate the rent due date. This line will need to be applied to each property. Would you be able to advice on this?

  • @bvybvy
    @bvybvy 3 ปีที่แล้ว

    Very creative, Parker! Thanks for taking the time to share. So can the events come from a table with columns for date and event_text? Also, can you hover over the bars to see the event text?

  • @Baldur1005
    @Baldur1005 5 ปีที่แล้ว

    Can groupby function be used instead of summerize?

  • @mnowako
    @mnowako 2 ปีที่แล้ว

    Awesome! Thank you!

  • @helenawickstrom9181
    @helenawickstrom9181 4 ปีที่แล้ว +1

    Hi, thanks for great video. Is it possible to have multiple reference lines?

    • @BIElite
      @BIElite  4 ปีที่แล้ว

      Yes! With a bit of extra DAX, you can specify multiple values that can show.

    • @helenawickstrom9181
      @helenawickstrom9181 4 ปีที่แล้ว +1

      BI Elite Hi, great!. Do you mind sharing that code?

    • @spilledgraphics
      @spilledgraphics 3 ปีที่แล้ว

      @@helenawickstrom9181 Could this help you?
      Reference Line =
      VAR Virtual =
      SUMMARIZE(
      ALLSELECTED( VideoStats ) ,
      VideoStats[day],
      "Views", SUM( VideoStats[views] )
      RETURN
      IF(
      AND(
      MIN( VideoStats[day] ) >= MIN( ‘Date’[Date] ) ,
      MAX( VideoStats[day] )

  • @abdullahkasabji398
    @abdullahkasabji398 3 ปีที่แล้ว +1

    Awesome Trick..

    • @BIElite
      @BIElite  3 ปีที่แล้ว

      Thanks Abdullah!

  • @mittar07
    @mittar07 3 ปีที่แล้ว

    How to make reference line on bar chart?

  • @hectoralvarorojas1918
    @hectoralvarorojas1918 5 ปีที่แล้ว

    Hi Parker:
    Great tip, as always!
    Thanks for sharing it!
    Best regards!

    • @BIElite
      @BIElite  5 ปีที่แล้ว

      Thank you, Hector!

    • @williamcollier3680
      @williamcollier3680 4 ปีที่แล้ว

      Nice tip many thanks. I need to add the bar by a date field in the data rather than dynamic with slicer. do you have that DAX by chance? many thanks

  • @1234clarknj
    @1234clarknj 5 ปีที่แล้ว

    Awesome tip!

    • @BIElite
      @BIElite  5 ปีที่แล้ว

      Thank you Nigel!

  • @EricaDyson
    @EricaDyson 5 ปีที่แล้ว

    Nice! Thanks for that!

    • @BIElite
      @BIElite  5 ปีที่แล้ว

      Thanks for watching, Erica!

  • @ShivaKumar-eq7pm
    @ShivaKumar-eq7pm 5 ปีที่แล้ว

    Nice.. Thank you

    • @BIElite
      @BIElite  5 ปีที่แล้ว

      Thanks for watching, Shiva!

  • @Bomyism
    @Bomyism 5 ปีที่แล้ว

    Niiiice!

    • @BIElite
      @BIElite  5 ปีที่แล้ว +1

      Right??