Forum Discussion

meghansh's avatar
meghansh
Frequent Visitor
1 year ago
Solved

Showing Label when value is 0

I have a bar graph with one value as 0. As I change the label orientation to "vertical" and position to "inside" the label with value "0" disappears because of having no bar to represent data. I still want to display that "0" value. How to achieve that? Thanks

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi meghansh ,

     

    Maybe you can try formula like below, then use it to column value:

    DisplayValue = 
    IF(
        MAX('Table'[Value])= BLANK(),
        0,
        MAX('Table'[Value])
    )

     

    Best Regards,
    Adamk Kong

     

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

     

5 Replies

  • Hi meghansh, please give more context, paste here the DAX used to calculate that value, include screenshot if necessary.

     

     

     

  • POSPOS's avatar
    POSPOS
    Post Partisan

    meghansh  - Try if this will resolve your issue:

     

    Step 1 : This is my data

     

    Step 2: Plot the data in a bar chart. By default data with null values will not show up.

     

    Step 3: Enable "Show items with no data" to show data with 0 values.

     

     

    Step 5 : Change the formatting options:

     

     

    Hope this helps.

    l

    • danextian's avatar
      danextian
      Super User

      Hi meghansh 
      That's just how the label behaves. There's just not enough space for the label to fit inside the column. I've looked into some custom viz but they still behave the same.

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi meghansh ,

     

    Maybe you can try formula like below, then use it to column value:

    DisplayValue = 
    IF(
        MAX('Table'[Value])= BLANK(),
        0,
        MAX('Table'[Value])
    )

     

    Best Regards,
    Adamk Kong

     

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

     

  • meghansh 

    Unfortunately, Power BI hides labels for zero values when there's no visible bar.

    Make sure that your bars are still showing even when the value is 0. If bars are completely hidden for 0 values, try adding a small minimum value (like 0.001) in the data preparation step to create a visible bar for the zero value.

    💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
    Cheers,
    Kedar
    Connect on LinkedIn