Hi All - Is there a way to suppress zero values from displaying on a NUX line graph? Thanks!
Solved! Go to Solution.
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):
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.
@JessicaD is this what you are looking for?
Hope this was helpful
Anurag
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.
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:
Brilliant! This worked perfectly! My graph no longer plots the zeros but rather starts from the first data point. Thank you for this solution!