Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparison when negative

Hello everyone,

In my dashboard I use a flag to compare :

If(COST>INVOICED,1) as "Flag PRS > Amount Invoiced"

It works.

The problem is with negative value.

For example, I have a cost at -49€ and an invoiced at -147€.

It enter to my flag, while you would not.

Is it possible to avoid this ?

Thanks

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Try this:

If(Fabs(COST)>Fabs(INVOICED),1) as "Flag PRS > Amount Invoiced"


let me know

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try this:

If(Fabs(COST)>Fabs(INVOICED),1) as "Flag PRS > Amount Invoiced"


let me know

ashfaq_haseeb
Champion III
Champion III

Hi,

look at fabs function, It will help you.

Regards

ASHFAQ

Not applicable
Author

Thanks, it works