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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
EmaVasileva
Helper V
Helper V

Numbers and text in X-axis line/area chart

Hi team,

I have an area chart where  X-axis is year/month field, y-axis is a value.

DateValue
2023-08-01null
2023-09-0148%

 

Is there a way, if I have an empty (null) value for one month to show the month and text on the axis as "No campaign", and all other months to show values. 

EmaVasileva_0-1706839737152.png


I tried but the visual doesn't accept text and number field in one. Another option,if it's possible if we have null to replace it with 0% but I need some kind of a tooltip/indicator where I can see the text "No campaign". (because it's possible for some months to have 0 and for other null).

Thank you.

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @EmaVasileva 
You can use customized labels for these results :

Create a measure like :

label = IF([value_]>0,FORMAT([value_],"0%"),"no campaigns" )
and put it on the graph:
Ritaf1983_0-1706843683112.png

PBIX is attached

More information about customized labels is here:

https://www.youtube.com/watch?v=MHaIDMu73sw

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @EmaVasileva 
You can use customized labels for these results :

Create a measure like :

label = IF([value_]>0,FORMAT([value_],"0%"),"no campaigns" )
and put it on the graph:
Ritaf1983_0-1706843683112.png

PBIX is attached

More information about customized labels is here:

https://www.youtube.com/watch?v=MHaIDMu73sw

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 ,

Thank you very much for the solution- it works!

Quick question -I updated my report in PBI desktop, but in PBI Service (after upload), the text "no campaings" doesn't show.  Is this work with you in the service or have you ever tested this custom label  in pbi service?

Thank you.

Hi @EmaVasileva 
Yes of course it is working from service...
The image after publishing :

Ritaf1983_0-1707123530494.png

 

Try to publish the report again, and Refresh the web page with F5 after publishing

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.