What formula can I use to display positive numbers Only in a visual? 0 and above?

I’m trying to display positive numbers only on a display without using the 0 reference on Y-axis of the line chart, using a calculated field. Like an ifelse statement but I was trying to see if there was another function I should be using?

Hi there e2s,

On a particular visual you can either:

  • Do as you have described and create a new calculated field including only values greater on 0.
  • or alternatively you can configure a filter that is only applied to that visual which filters for greater than 0 on the original field.

Hope that helps!

1 Like

Ok I think I worded the title incorrectly,

I need to only see numbers above ‘zero’, the problem with this answer @robkc is that I have positive and negative numbers in a calculated field and I need to see the TOTAL SUM of those numbers over a day or an hour.

If i only look at ‘positive’ numbers, it filters all the ‘negative’ number from the field and the balance of the SUM is incorrect. if that makes sense?

I’m using a calculated field, to give me the balance of what’s left and only show me numbers above ‘Zero’ because of the timing sometimes I get a balance that is a negative number.

the calculated field is: Supply - Consumer A - Consumer B = Consumer C

'Consumer C is the balance of the Supply’ and due to Timing -say there hasn’t been a refresh of the ‘Supply data’ I get a negative balance but I would rather see ‘Consumer C’ = ‘Zero’ or NULL.

Essentially ‘Hide’ the negative numbers some how in a visual?

Hi e2s-
You can add an ifelse in the calculation and set the value to zero if it’s below zero.
See ifelse examples here.

1 Like

Hi Kellie,

The IFelse statement doesn’t work because there’s negative numbers and positive numbers and I need to know the overall balance for the SUM for the day.

When I use the IFelse statements it excludes the negative numbers because it’s only calculating and adding up numbers above ‘0’ and I end up with an incorrect SUM. The balance of the SUM is not truely represented. (I hope that makes sense)

I’ve managed to fix it myself just using a Filter ‘Greater than’ 0 on the SUM of the Calculated field (Consumer C).