Suppress Zeros on Graphs
Hi All - Is there a way to suppress zero values from displaying on a NUX line graph? Thanks!
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.0 -
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.
1 -
- Edit the page.
- Under the Card Configurations.
- In the Data Section uncheck Trailing Zeros.
@JessicaD is this what you are looking for?
Hope this was helpful
Anurag0 -
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:
- The idea to use NaN was shared with me by @R_Goza. Additionally, @ChrisAHeathcote shared the overall approach previously in another post.
- Anapedia offers another suggestion for Handling Zeros in Charts to use a very small number instead of NaN.
- There is an open Idea on the Idea Exchange for this topic: https://community.anaplan.com/t5/Idea-Exchange/Do-not-show-zero-values-in-charts/idi-p/51403
3 -
Expanding my above message with a mocked up example.
Constants module with a NaN value:
Data module with values:
System module with logic to check for zeros:
Additional line item showing NaN values in place of zeros:
Final output in the UX (comparing the two line items):
4 -
Brilliant! This worked perfectly! My graph no longer plots the zeros but rather starts from the first data point. Thank you for this solution!
0 -
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.
0 -
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
2 -
I love how creative the community members are. This is great, thank you for this.
0 -
Incredible solution. Very nice work!
0