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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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