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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 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 Kudoed Authors