Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

changing my -0% value to 0%(not fab)

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)

15 Replies
ashfaq_haseeb
Champion III
Champion III

Can you share sample data with expected output

Regards

ASHFAQ

juleshartley
Specialist
Specialist

Why doesn't

=round(sum([Value]),0.01)

work?

mjayachandran
Creator II
Creator II

Something like this? not sure if it will work

=Sum({<sum(value)={">-1<=0"}>}(value)*-0)

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Not applicable
Author

Because I am evaluating my variable in the backend and then evaluating the expression so the round function will work in the back end

Not applicable
Author

I don't want if condition to be written in my app as there are too many so that there is a performance issue