Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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!
Solved! Go to Solution.
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,
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.
Hi @EstherBR
If you're using a bar chart, that option should be under Data Label for each costant line.
Hi, if you are referring to the Constant line in Reference line, you should be able to edit its name directly on its name.