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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
steven_koolen
Contributor
Contributor

Error in query

Hello all,

I want to make a calculated field based on an amount in the query.

IF([Invoice Due Age]<= 0, 'Not overdue',

IF([Invoice Due Age] >= 1 AND [Invoice Due Age]<=30, '0-30',

IF([Invoice Due Age] >= 31 AND [Invoice Due Age]<=90,'30-90',

IF([Invoice Due Age] >= 91 AND [Invoice Due Age]<=120,'90-120','120+'))))

It works when I don't have an AND condition in the query, but as soon when I have that it keeps giving the error Missing right parenthesis.

What am I doing wrong?

Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar

Why do you need AND, have you tried this?

F([Invoice Due Age]<= 0, 'Not overdue',

IF([Invoice Due Age]<=30, '0-30',

IF([Invoice Due Age]<=90,'30-90',

IF([Invoice Due Age]<=120,'90-120','120+'))))

View solution in original post

2 Replies
sunny_talwar

Why do you need AND, have you tried this?

F([Invoice Due Age]<= 0, 'Not overdue',

IF([Invoice Due Age]<=30, '0-30',

IF([Invoice Due Age]<=90,'30-90',

IF([Invoice Due Age]<=120,'90-120','120+'))))

steven_koolen
Contributor
Contributor
Author

‌worked like a charm. Thanks