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
EstherBR
Helper I
Helper I

Customize data label in a constant line

Hi,

 

I have this constant line and I would like to customize the data label. How can I add the text "Date: 16/09/2026" to the data label? Thank you so much!

 

EstherBR_1-1759873479057.png

 

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

Hi @EstherBR,

Thank you for reaching out to the Microsoft Fabric Community Forum and sharing the screenshot that helps a lot in understanding what you are trying to achieve. Also, thanks to @danextian@MasonMA@djurecicK2, for those inputs on this thread.

Now, Power BI’s Constant Line feature does not support adding custom text directly to its data label. The label can only display the line’s value, not free-form text like “Date: 16/09/2026”. However, there are a couple of ways you can achieve a similar outcome.

Using a custom measure as a workaround: You can create a measure that returns your preferred label text, for example:

Custom Label = "Date: 16/09/2026"

Then, add this measure to your visual (for example, as a point or line at the same value as your constant line). Turn on Data Labels for that series the label will now display “Date: 16/09/2026”. You can then hide the original constant line label to keep the chart clean.

Alternatively, you can add a text box or annotation near the line in your visual to manually display the custom text. You can find more details on adding and formatting constant lines in Power BI here:
https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane 

Hope this helps. Let us know if you have any doubts regarding this. We will be happy to help.

Thank you for using the Microsoft Fabric Community Forum.

View solution in original post

6 REPLIES 6
v-kpoloju-msft
Community Support
Community Support

Hi @EstherBR,

Thank you for reaching out to the Microsoft Fabric Community Forum and sharing the screenshot that helps a lot in understanding what you are trying to achieve. Also, thanks to @danextian@MasonMA@djurecicK2, for those inputs on this thread.

Now, Power BI’s Constant Line feature does not support adding custom text directly to its data label. The label can only display the line’s value, not free-form text like “Date: 16/09/2026”. However, there are a couple of ways you can achieve a similar outcome.

Using a custom measure as a workaround: You can create a measure that returns your preferred label text, for example:

Custom Label = "Date: 16/09/2026"

Then, add this measure to your visual (for example, as a point or line at the same value as your constant line). Turn on Data Labels for that series the label will now display “Date: 16/09/2026”. You can then hide the original constant line label to keep the chart clean.

Alternatively, you can add a text box or annotation near the line in your visual to manually display the custom text. You can find more details on adding and formatting constant lines in Power BI here:
https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-analytics-pane 

Hope this helps. Let us know if you have any doubts regarding this. We will be happy to help.

Thank you for using the Microsoft Fabric Community Forum.

Hi @EstherBR,

Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.

Thank you.

danextian
Super User
Super User

Hi @EstherBR 

If you're using a bar chart, that option should be under Data Label for each costant line.

danextian_0-1759895307226.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
MasonMA
Resident Rockstar
Resident Rockstar

Hi, if you are referring to the Constant line in Reference line, you should be able to edit its name directly on its name. 

MasonMA_0-1759878581604.png

 

djurecicK2
Super User
Super User

Hi @EstherBR ,

 What visual are you using?

Hi @djurecicK2 , I am using a line chart. Thanks!

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors