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: 
Anonymous
Not applicable

null values

Hai,

i got a error in expression ')' expected even the scripts are correct.but the file has no data..so i am thinking,it could be bttr,if i insert null values in dt file.is thz possible..r does anyone knows any good idea.i have tried many things to rectify this pblm..

but no results..thanks in advance.

5 Replies
avinashelite

Information is not clear , explain with an example and share the script and expressions

Anonymous
Not applicable
Author

A:

load

Date,Qty

from(blah blah)

B:

LOAD

     Max(Date) as MaxDate

Resident A;

LET vMaxDate = floor(peek('MaxDate'));

DROP Table B;

A1:

LOAD *,

     if(((Date=Date(Floor(MonthEnd(Date))))or Date=$(vMaxDate)),Qty,0) as month_qty

    

     Resident A;

     DROP Table A;

the error is in variable.y bcoz that file has no data.what can i do to find the solution.and i am using same format of expression to all.bt this file nly showing error.due to no data..i think so.

jonathandienst
Partner - Champion III
Partner - Champion III

If you want to pass over some of the script if the file is empty, then perhaps something like this:

A:

LOAD

    Date,

    Qty

from(blah blah);

If Alt(NoOfRows('A'), 0) > 0 Then

    B:

    LOAD

         Max(Date) as MaxDate

    Resident A;

    

    LET vMaxDate = Floor(Peek('MaxDate'));

    DROP Table B;

    

    A1:

    LOAD *,

         If((Date = Floor(MonthEnd(Date)) or Date = $(vMaxDate)), Qty, 0) as month_qty  

    Resident A;

    DROP Table A;

   

Else

   

    TRACE --> No data to load;

End If

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Hai..ur post must be helpful to me..thanks a lot.

Anonymous
Not applicable
Author

hai,

jonathan...i am not sure but wht abt the error mode function.. this function also help to this ???????can u explain me.