Forum Discussion

janfcarl's avatar
janfcarl
Icon for Helper I rankHelper I
6 years ago

Hide data labels when the value is 0

I have a chart where I show data labels (see picture).

In case of a 0 value, I would like to hide the label. Is this possible?

Note that I do not necessarily want to filter 0 values. These values should still stay in the chart, just without a label.

 

3 Replies

  • dax's avatar
    dax
    Icon for Community Support rankCommunity Support

    Hi janfcarl , 

    You could try below measure to see whether it work or not. If this doesn't work, please inform me your simple sample.

    Measure = if( SUM('Table'[amount])/SUM('Table'[amount2])=0, BLANK(),SUM('Table'[amount])/SUM('Table'[amount2]))

     

    Please do mask sensitive data before uploading.

    Thanks for your understanding and support.

    Best Regards,
    Zoe Zhi

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

    • janfcarl's avatar
      janfcarl
      Icon for Helper I rankHelper I

      Hi Zoe,

       

      thanks for your reply, I tried the solution.

      The problem is the entries vanish from the x axis if the values are 0.

      E.g. if I have 3 entries, a = 0, b = 3, c = 5 and I use the condition, only b and c are shown on the x axis.

      Is it possible to not filter the entries and still show a, b, c?

      Kind regards,

      Jan

    • janfcarl's avatar
      janfcarl
      Icon for Helper I rankHelper I

      Hi Zoe,

       

      as soon as I check "Show items with no data" option an x axis, it works as expected. Thank you!

       

      Jan