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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
314mp_M0th4
Resolver I
Resolver I

Data labels only on last column/line point

Hello, I have a time series line plot visualization in power bi. X axis are months and the y axis are some values. I want to have data labels only for the last point on the line. Is this possible?

2 ACCEPTED SOLUTIONS
v-tangjie-msft
Community Support
Community Support

Hi @314mp_M0th4 ,

 

You might consider creating a measure to display the last data and then placing it on the card visual object, adjusting the card formatting background, etc. to display the card as a data label.

vtangjiemsft_0-1694417377356.png

 

 

As @CoreyP  said, it is also possible to create dynamic format strings for measure.

vtangjiemsft_1-1694417399730.png

 

vtangjiemsft_2-1694417415470.png

 

 

 

Best Regards,

Neeko Tang

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

CoreyP
Solution Sage
Solution Sage

I actually just did that this week. I was playing around with animating a line chart, like so:

CoreyP_0-1694142322152.gif

You can accomplish this using a dynamic format string for your measure. To get the animation to work, it required a disconnected date table. Since you're not animating, it might not require the disconnected table, but I'm not sure. Here is the dynamic format string for my measure:

VAR _onmonth = MAX( CustomerRank[Date] )
VAR CustName = SELECTEDVALUE( CustomerRank[Customer] )
VAR _logic = IF( _onmonth = MAX( 'Disconnected Date'[Date] ) , CustName , " " )

RETURN
_logic

The Play Axis visual uses the disconnected date table, while the line chart uses the regular date field. I'm sure you can tweak this to suit your needs, but it's definitely possible! Hope this helped!

View solution in original post

2 REPLIES 2
CoreyP
Solution Sage
Solution Sage

I actually just did that this week. I was playing around with animating a line chart, like so:

CoreyP_0-1694142322152.gif

You can accomplish this using a dynamic format string for your measure. To get the animation to work, it required a disconnected date table. Since you're not animating, it might not require the disconnected table, but I'm not sure. Here is the dynamic format string for my measure:

VAR _onmonth = MAX( CustomerRank[Date] )
VAR CustName = SELECTEDVALUE( CustomerRank[Customer] )
VAR _logic = IF( _onmonth = MAX( 'Disconnected Date'[Date] ) , CustName , " " )

RETURN
_logic

The Play Axis visual uses the disconnected date table, while the line chart uses the regular date field. I'm sure you can tweak this to suit your needs, but it's definitely possible! Hope this helped!
v-tangjie-msft
Community Support
Community Support

Hi @314mp_M0th4 ,

 

You might consider creating a measure to display the last data and then placing it on the card visual object, adjusting the card formatting background, etc. to display the card as a data label.

vtangjiemsft_0-1694417377356.png

 

 

As @CoreyP  said, it is also possible to create dynamic format strings for measure.

vtangjiemsft_1-1694417399730.png

 

vtangjiemsft_2-1694417415470.png

 

 

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.