Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am getting a value -0 by using an expression and representing in the percentage format the actual value is 0.02 but showing in percentage it represents -0. so, I want to change it 0.
And I don't want to use fab function that doesn't fit my situation is there any thing around to do it
I have tried round function but its rounding the function before the percentage has been evaluated(in variable)
How about this?
=if([your expression] < 0 and [your expression] > -0.5, 0, [your expression])
If you put your expression in a variable, this would then read:
=if($(eExp) < 0 and $(eExp) > -0.5, 0, $(eExp))
Should do the trick. I used to be concerned about performance of having an expression multiple times like that, but I have been very reliably informed (thanks, Henric Cronström) that the caching in the QlikView engine will ensure that each number is only calculated once.
Hope that helps,
Steve
like this
=-0*-0
Regards
ASHFAQ
That doesn't work because I have many values and if I do that all the values will become zero . This is percentage values and it can be negative but when I get 0 or -0 it should display 0
Keeping the thread live
Are you sure it's not a rounding issue? Try round([xx])...or you may need something like round([xx],0.01)
No it's not rounding issue I have tried round function in a variable and then representing it in percentage so that doesn't work out because it is rounding the expression so it get the value that the expression has and its rounding that not as of the percentage. I need to calculate the percentage and then round it up
Not sure I understand. Surlely a percentage is the same thing... just with 2 decimal places.
if(sum(value)>-1 and sum(value)<=0,sum(value)*-0)
I can use expression like this but it causes performance issue I want an alternate way to sort it out
As discussed
try the same in backend
Regards
ASHFAQ
That doesn't workout in the back end