cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

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

@ZiaAnderson 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






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

ZiaAnderson Regular Visitor
Regular Visitor

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

@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!
Super User
Super User

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

@ZiaAnderson 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






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

ZiaAnderson Regular Visitor
Regular Visitor

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

@parry2k  Thank you! I was making it more difficult than it is 🙂

ZiaAnderson Regular Visitor
Regular Visitor

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

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!

Super User
Super User

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

@ZiaAnderson 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.






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Hugh Frequent Visitor
Frequent Visitor

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

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

Super User
Super User

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

@Hugh 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?






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Hugh Frequent Visitor
Frequent Visitor

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

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
New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (2,641)