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
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).
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
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!
His bar is thin because he has lots of data on the x axis. There is no way to fix that
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.
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.
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
Thank you! Very elegant and efficient!!
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()
)
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?
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?
Can groupby function be used instead of summerize?
Awesome! Thank you!
Hi, thanks for great video. Is it possible to have multiple reference lines?
Yes! With a bit of extra DAX, you can specify multiple values that can show.
BI Elite Hi, great!. Do you mind sharing that code?
@@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] )
Awesome Trick..
Thanks Abdullah!
How to make reference line on bar chart?
Hi Parker:
Great tip, as always!
Thanks for sharing it!
Best regards!
Thank you, Hector!
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
Awesome tip!
Thank you Nigel!
Nice! Thanks for that!
Thanks for watching, Erica!
Nice.. Thank you
Thanks for watching, Shiva!
Niiiice!
Right??