Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Marking Today's Date with a Line on the Line Chart

Hello!

I have this line chart and was asked to mark today's date with a vertical line (same one that appears when the mouse point rolls over).  Is it possible to do that? I've created a "today's date" column, but not sure how to make it work.

Thank you!

Capture2.JPG

2 ACCEPTED SOLUTIONS

@Anonymous glad to help, feel free to reach out if need any assistance. Accept the solution if it is working as expected so that others can take advantage of it.

 

Cheers,

Parv



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

View solution in original post

@Anonymous oh that table is created using DAX under Data Table

 

go to modelling tab, click new table  and add expression to create the table

 

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

View solution in original post

21 REPLIES 21
parry2k
Super User
Super User

@Anonymous yes this can be achieved by writing some measures. How does your data model looks like? Do you have seperate date dimensions? What is the expression for these two measures you showed in line visual?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

ALL-2018.JPG

Capture2.JPG@parry2k  I only have one table for this particular line chart called 'Data'. The fields are use are highlighted in the screen shot - I don't use measures for this chart. I have created Today Column hoping to use it to create the line.

@Anonymous can you send sample data in excel, shared thru google drive/onedrive and send back you the solution. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k  Here is the file that I use for that report:

https://drive.google.com/open?id=1E28Ms4cDgqQPXbpZRBlzAvKzqXxbYZZL

 

Thank you very much! Enjoy your weekend!

Ana

 

@Anonymous will have something to you soon. You too, enjoy your weekend. and keep an eye on reply to this post ๐Ÿ™‚

 

CHeers,

P



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

@Anonymous would this work?

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k I am so sorry i missed your post from Friday - never recieved an email notification. Yes! That would work perfectly! How did you go about it?

 

thanks!

@Anonymous here you go, see attached



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

You are a genius! Thank you very much. I am new to Power BI and learing on my own as I go. Your help is very much appreciated. Have a great weekend!

Ana

@Anonymous glad to help, feel free to reach out if need any assistance. Accept the solution if it is working as expected so that others can take advantage of it.

 

Cheers,

Parv



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi @parry2k ,

 

I came across this thread and I'm hoping you might be able to help me out as well. I would also like to create a today line, however the figure I would like to add it to currently dislays a measure as its line value that is a bit more compicated than the SUM measures used in this example. My measure is as follows:

E_date approved = calculate(DISTINCTCOUNT(MilestonesAndDependencies[Milestone Name]), filter(allselected(MilestonesAndDependencies), MilestonesAndDependencies[End date approved] > min(MilestonesAndDependencies[End date approved])))
 
The measure above basically enables me to show a burndown chart that displays when something should be implemented, according to the date that was stated as the [end date approved] at the start of our project:
 
Odi_0-1614954649406.png

However when i apply your method the best result so far is this:

Odi_1-1614954699629.png

Am i missing something, or does your method perhaps not work when using more complicated measures as lines?

Any help will be greatly appreciated.

kind regards,
Odi

 

Anonymous
Not applicable

Thanks @parry2k I downloaded your solution file and got it working - I needed to add a new column for Date2 based on your date +700 because it is now about 2yrs after your dates (so 'today' wasn't showing up).

 

However my 'today' bar is very thick, not like yours which is a line - just what I want.

 

Greatly appreciated if you or anyone could share how to make the column a thin vertical line.

Blue column is today but should be a thin line.Blue column is today but should be a thin line.

Anonymous
Not applicable

@parry2k actually no, just realised I didn't get it working in your solution, but I got it working in mine - just the thick line rather than thin line. Thanks.

Anonymous
Not applicable

@parry2k 

Parv,

Sorry for being so dumb, but I can't figure out how you created the Calendar table in the solution you'd sent. The column "Date" in particular. i see from the icon, that it's not a Measure and not a Calculated column, but the table itself has a formula.

Calendar = CALENDAR( DATE( 2017,1,1), DATE(2019,12,31))
I tried to "Get Data" from 'Blank Query" and use the formula, but that didn't work. Please help!

@Anonymous oh that table is created using DAX under Data Table

 

go to modelling tab, click new table  and add expression to create the table

 

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

@parry2k  Thank you! I was making it more difficult than it is ๐Ÿ™‚

Anonymous
Not applicable

Line.jpgMine.jpg

 

@parry2k  Sorry! 2 more questions: 1. On your chart Today shows as a column in 'Column values" section. On mine it gives me an option for a Count, Sum, etc. How do I display it as a just "Today".

2. You have "Tooltip" in the "Tooltips" section. How is that done?

thank you!

@Anonymous Today is a measure, not a column.

 

Today = 

VAR __released = MAXX( ALLSELECTED( 'Calendar'[Date] ), [Released] )
VAR __disbursements = MAXX( ALLSELECTED( 'Calendar'[Date] ), [Disbursements] )
RETURN
IF( 
    MAX( 'Calendar'[Date] ) = TODAY(), 
    MAX( __released, __disbursements ) 
) * 1.05 --multiply with factor to get longer bar

For tooltip, here is the post

 

If you still need assistance, please reach out to by email (on my signature) and I can walk you thru screen sharing.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi @parry2k ,

I hope you are doing well. Thank you for being our mentor.

I'm running into similar situation where I need to create a vertical line showing current date. I followed this conversation and managed to create the vertical line.

However, the two lines generated using measures became straight horizontal lines (instead of showing actual curves). Could you please have a look and point me to the right direction?

I appreciate your help.

Cheers,

Hieu

Date line issue.PNG

@Anonymous can you share what are the measure for those lines and how your data model looks like? Were those lines working before you added today's vertical line?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! โค


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos ๐Ÿ™‚
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi @parry2k ,

The measures for those lines are: 

PlannedRemain = SUM( Table1[Planned Meters Remaining] )
ActualRemain = SUM( table1[Actual Meters Remaining] )
//the column names has changed in our new data set but it shouldn't affect anything.
I also calculated a table named "Calendar" as well as measure "Today" 
Calendar = CALENDAR(DATE(2019,09,1), DATE(2021,07,30))
Today =
VAR __planned = MAXX( ALLSELECTED( 'Calendar'[Date] ), [PlannedRemain] )
VAR __actual = MAXX( ALLSELECTED( 'Calendar'[Date] ), [ActualRemain] )
RETURN
IF(
MAX( 'Calendar'[Date] ) = TODAY(),
MAX( __planned, __actual )
) * 1.0
The lines displayed nicely when I used "Wk No" (week number) instead of "Date" in Shared axis. But then the "Today" bar wasn't displayed since there's no reference to date. Please see attached screenshot.
Looks like I'm having trouble with Date table and its relationship.
Thank you for your time.
Cheers,
Hugh
Date line issue 2.PNG
Date line issue 3.PNG

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (27)