Reply
EmaVasileva
Helper V
Helper V
Partially syndicated - Outbound

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

Syndicated - Outbound

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

Syndicated - Outbound

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

Syndicated - Outbound

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.

Syndicated - Outbound

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
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)