Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sindhura
Contributor II
Contributor II

Invalid expression error in qlikview

hi

I have script in the following way. When I execute this script,i encounteres the invalid expression error, specifically in the line

if(isnull(REFERENCE),if(VALUE >0, VALUE))  as   NA_VALUE.

Kindly solve this asap.

load
REFERENCE,
agrmt,
if(sum(NA_VALUE)>0,NA_VALUE ,0) as R_V
group by agrmt,REFERENCE
;
Load
REFERENCE,
VALUE,
NA_VALUE,
if(isnull(REFERENCE), 'No Netting Agreement',REFERENCEas   agrmt
;

Load
REFERENCE,
VALUE,
if(isnull(REFERENCE),if(VALUE >0, VALUE))  as   NA_VALUE
From A;

6 Replies
sunny_talwar

Would you be able to post a screenshot of the error?

sindhura
Contributor II
Contributor II
Author

error.PNG

maxgro
MVP
MVP

add a sum in the load with the group by


load

REFERENCE,

agrmt,

if(sum(NA_VALUE)>0,sum(NA_VALUE) ,0) as R_V

group by agrmt,REFERENCE

;

sunny_talwar

I think try out maxgro solution, he might be right

maxgro
MVP
MVP

This is the script I used to test the syntax for my answer (difference with your first post is in bold)

A:

load * inline [

REFERENCE, VALUE

1,0

0,1

];

load

REFERENCE,

agrmt,

if(sum(NA_VALUE)>0,sum(NA_VALUE) ,0) as R_V

group by agrmt,REFERENCE

;

Load

REFERENCE,

VALUE,

NA_VALUE,

if(isnull(REFERENCE), 'No Netting Agreement',REFERENCE)  as   agrmt

;

Load

REFERENCE,

VALUE,

if(isnull(REFERENCE),if(VALUE >0, VALUE))  as   NA_VALUE

Resident A;

Anonymous
Not applicable

Hi, try with this:

if(isnull(REFERENCE) AND VALUE > 0, VALUEas   NA_VALUE


Regards!