Suppress Zeros on Graphs

 Hi All - Is there a way to suppress zero values from displaying on a NUX line graph? Thanks!

Zero Values.png

Answers

  • Go to the source and in the format -> blueprint -> select blank when zero in the format.
    Hope this helps.
    Mark it as Solved if this works.

     

  • Thank you! This approach removes the data label but the chart still plots the zeros. I'm looking for a way to stop the zeros from being plotted if that's possible.

    Zero.png

    Blank.png

      

    1. Edit the page.
    2. Under the Card Configurations.
    3. In the Data Section uncheck Trailing Zeros.

      Anurag0911_0-1659037905865.png

    @JessicaD is this what you are looking for?

    Hope this was helpful
    Anurag

     

  • The only way to do this from the UX only is to turn off the plotting of trailing zeros (suggested by @Anurag0911). However, this does not help you with any other zero values.

     

    Expanding a bit on the suggestion by @ankit_cheeni to filter out zeros from the chart, you can actually "trick" Anaplan to avoid plotting a zero value by replacing your 0's with NaN's. While you can't manually enter NaN into a line item, you can write a formula that will return NaN. I suggest adding a NaN value to a System constants module so you can use it across your model as needed.

     

    One example of a formula to generate a NaN:

     

    DIVIDE(0,0)

     

     

    See below post for mocked up example.

     

    Additional resources/credits:

     

  • Expanding my above message with a mocked up example.

     

    Constants module with a NaN value:

    ryan_kohn_0-1659044044673.png

    ryan_kohn_1-1659044074113.png

     

    Data module with values:

    ryan_kohn_2-1659044129119.png

     

    System module with logic to check for zeros:

    ryan_kohn_3-1659044167173.png

     

    Additional line item showing NaN values in place of zeros:

    ryan_kohn_4-1659044217527.png

     

    Final output in the UX (comparing the two line items):

    ryan_kohn_5-1659044257363.png

     

     

     

     

  • Brilliant! This worked perfectly! My graph no longer plots the zeros but rather starts from the first data point. Thank you for this solution!

  • Thank you @Anurag0911 This solution works if the zeros are at the end. In my use case, the zeros were in the beginning. This is really helpful though for graphs with trailing zeros.

  • FYI I have documented the steps in this solution in a How To article: https://community.anaplan.com/t5/How-To/Suppressing-zeros-in-line-charts/ta-p/143610

  • I love how creative the community members are. This is great, thank you for this.

  • Incredible solution. Very nice work!