Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following expression in my table to handle divide by zero....
I have a variance % column which needs to display it as 100% and not 0%
=Alt((sum({$<Type={'Actuals'}>}Amount)/sum({$<Type={'Budget'}>}Amount)-1)*1, '0')
I've tried changing the '0' to '1'...... but this essentially breaks my table?
If statement perhaps???
You can do it with if like this:
If (
(sum({$<Type={'Actuals'}>}Amount)/sum({$<Type={'Budget'}>}Amount)-1)*1)=0,
1,
(sum({$<Type={'Actuals'}>}Amount)/sum({$<Type={'Budget'}>}Amount)-1)*1)
I ended up using this:
=if(sum({$<Type={'Budget'}>}Amount)= 0, (sum({$<Type={'Actuals'}>}Amount)/sum({$<Type={'Actuals'}>}Amount))*1, sum({$<Type={'Actuals'}>}Amount)/sum({$<Type={'Budget'}>}Amount)-1)*1