Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
l_denivelle
Contributor

Set negative value to 0 via Number Format

Hi

I have a straight table with expressions. One of my expression is returning positive and negative amounts.

I need the negative amount to be set at 0€.

Is it possible to do it in the Number / Format tab ?

(I know I can put an "IF" in my expression to say "If amount < 0 then 0 else amount" but I want to avoid IF in my expression.

Thanks for your help

Laure

1 Solution

Accepted Solutions

Re: Set negative value to 0 via Number Format

Try this

RangeMax(YourExpression, 0)

5 Replies

Re: Set negative value to 0 via Number Format

With out IF i don't think it is possible

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Re: Set negative value to 0 via Number Format

Try this

RangeMax(YourExpression, 0)

Re: Set negative value to 0 via Number Format

Without using if you can use mapping load in the script part and may those values and make calculation on the script part.

Hope this helps

Regards

Anand

Re: Set negative value to 0 via Number Format

It might be, using RangeMax()

l_denivelle
Contributor

Re: Set negative value to 0 via Number Format

Thanks it works