Forum Discussion
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.
| Date | Value |
| 2023-08-01 | null |
| 2023-09-01 | 48% |
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.
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.
Hi Anonymous
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:
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
Hi Anonymous
Yes of course it is working from service...
The image after publishing :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
3 Replies
- Ritaf1983
Super User
Hi Anonymous
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:
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
- AnonymousNot applicable
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.- Ritaf1983
Super User
Hi Anonymous
Yes of course it is working from service...
The image after publishing :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