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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Saniat
Helper V
Helper V

Only show the latest value in a Trend Line

Hi,

I want to show only the latest value in a trend line.

I am aware that I can reduce the frequency of the label, but I only want to show the latest data label.

Is it possible ?

Saniat_0-1653405592195.png

 

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

Hi @Saniat ,

 

I created the following example data. 

 

vkkfmsft_0-1653642522174.png

 

Then add the following measure to the line chart. Then turn off the data label for the [Value] series and turn on the data label for the measure [LastValue] only.

 

LastValue = 
IF (
    MAX ( 'Table'[Index] ) = MAXX ( ALLSELECTED ( 'Table' ), 'Table'[Index] ),
    SUM ( 'Table'[Value] )
)

vkkfmsft_1-1653642577518.png

vkkfmsft_3-1653642653001.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

6 REPLIES 6
v-kkf-msft
Community Support
Community Support

Hi @Saniat ,

 

I created the following example data. 

 

vkkfmsft_0-1653642522174.png

 

Then add the following measure to the line chart. Then turn off the data label for the [Value] series and turn on the data label for the measure [LastValue] only.

 

LastValue = 
IF (
    MAX ( 'Table'[Index] ) = MAXX ( ALLSELECTED ( 'Table' ), 'Table'[Index] ),
    SUM ( 'Table'[Value] )
)

vkkfmsft_1-1653642577518.png

vkkfmsft_3-1653642653001.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Thanks for this.
I have Event Date instead of Index, so tried this:

IF (
MAX ( '1'[Event Date] ) = MAXX ( ALLSELECTED ('1'), '1'[Event Date] ),
SUM ( [HC=1])
)

But for some reasons, I am getting slightly different value than expected.

Any clue what could be wrong here ?

Hi @Saniat ,

 

The field in the MAX/MAXX function depend on your x-axis fields, is your x-axis only the [Event Date] column?

 

Best Regards,
Winniz

That is right, it is only Event Date field.

Hi @Saniat ,

 

Please try this measure to see if it returns the correct value.

 

LastValue = 
IF (
    MAX ( '1'[Event Date] ) = MAXX ( ALLSELECTED ( '1'[Event Date] ), '1'[Event Date] ),
    SUM ( '1'[HC=1] )
)

 

Best Regards,
Winniz

amitchandak
Super User
Super User

@Saniat , refer to my blog on this. check if that can help

https://community.powerbi.com/t5/Community-Blog/Display-Label-Only-on-the-Last-Data-Point-of-the-Lin...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.