Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

How to remove -ve sign from the value -0.0 as 0.0

Dear friends,

Please help me out here. very urgent.

I have a year on year(YoY) set analysis expression which is giving me both +ve and -ve values.

But, some values are there as -0.001234567

So I customer wanted to see only up to two decimal places and when I do that these value is coming as -0.0

I wanted to show -0.001234567 as 0.0(need to remove negative sign)

I have tried with round(expression,0.1) but this is not giving correct result in all cases.

Please help.

Thanks,

SHAMLY P T

Tags (2)
19 Replies
Highlighted

Re: How to remove -ve sign from the value -0.0 as 0.0

May be this:

Ceil(Expression, 0.1)

Highlighted
Esteemed Contributor III

Re: How to remove -ve sign from the value -0.0 as 0.0

hi,

u can use

Fabs( urfield)

it will gives u +ve values.

and in number tab u can chnge the  format to get exact number

*** Negative Value to Positive Value ***

In Pivot table, How to fabs first and then sum

Highlighted

Re: How to remove -ve sign from the value -0.0 as 0.0

=round(YourExpression *-1,0.1)

Highlighted

Re: How to remove -ve sign from the value -0.0 as 0.0

Kush, won't this convert a positive value into a negative one?

Highlighted

Re: How to remove -ve sign from the value -0.0 as 0.0

Yeah correct. I forgot there is positive too.

round(fabs(YourExpression),0.1)

Highlighted
Esteemed Contributor III

Re: How to remove -ve sign from the value -0.0 as 0.0

chk sample

Highlighted
Not applicable

Re: How to remove -ve sign from the value -0.0 as 0.0

Sunny,

Thanks for ur reply.

But ceil and Round will not give correct value here.

I have values like -0.0123, -0.53,-0.7,0.0001 etc..

Round and ceil is making 0.6 as 1.

I want -0.023 to be shown as 0.0

I want -0.0 to be shown as 0.0

I want 0.6 to be shown as 0.6

I want -0.6 to be shown as -0.6

I want -0.0 to be shown as 0.0

Highlighted

Re: How to remove -ve sign from the value -0.0 as 0.0

0.6, -0.023 are working, the one which isn't working is -0.6

Capture.PNG

Capture.PNG

Capture.PNG

May be use an if statement to get it to work in that case

Highlighted

Re: How to remove -ve sign from the value -0.0 as 0.0

May be try this:

=Num(If(Expression < -0.1, Expression , Ceil(Expression , 0.1)), '#.#')