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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Last value point on line chart

Hi Power BI Community!

I want to show the last value on the chart like this: 

Beginner_2020_0-1628764292547.png

and it works with this measure: 

Todays Value = var maxdate = CALCULATE(MAX(Dates[Date]),ALLSELECTED(Dates[Date]),FILTER(Dates,Dates[Date]=TODAY())
)return IF(MAX(Dates[Date])=maxdate, [Measure])

BUT if I use the date slicer the value points disappear. I think it is because I use TODAY() which measure can I use?

 

 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

Try to create a measure like this:

Last Value =
IF (
    MAX ( Dates[Date] ) = MAXX ( ALLSELECTED ( 'Dates'[Date] ), 'Dates'[Date] ),
    [Measure]
)

result:

vangzhengmsft_0-1629094275872.png

Please refer to the attachment below for details

 

 

Hope this helps.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

Try to create a measure like this:

Last Value =
IF (
    MAX ( Dates[Date] ) = MAXX ( ALLSELECTED ( 'Dates'[Date] ), 'Dates'[Date] ),
    [Measure]
)

result:

vangzhengmsft_0-1629094275872.png

Please refer to the attachment below for details

 

 

Hope this helps.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

jdbuchanan71
Super User
Super User

jdbuchanan71
Super User
Super User

@Anonymous 

When if you try it without TODAY()?

Todays Value =
VAR maxdate =
    CALCULATE ( MAX ( Dates[Date] ), ALLSELECTED ( Dates[Date] ) )
RETURN
    IF ( MAX ( Dates[Date] ) = maxdate, [Measure] )
Anonymous
Not applicable

@jdbuchanan71 Thanks for your response but the measure is not the solution:

Beginner_2020_0-1628775034151.png

 

@Anonymous 

I see where I went wrong, my ALLSELECTED was too narrow.  I think this will give you what you are looking for without having to iterate all of the selected dates.

Todays Value =
VAR maxdate =
    CALCULATE ( MAX ( Dates[Date] ), ALLSELECTED ( Dates ) )
RETURN
    IF ( MAX ( Dates[Date] ) = maxdate, [Measure] )

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.