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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

App closes when with this expression

When i test this expression in a text object it works fine. However, when i load it within theload script, my script automatically closes and asks to reopen old data. Any idea's what is going on?

sum(if(Week = WEEK(TODAY(0)), if(DayOfWeek <= num(WEEKDAY(TODAY(0))), [Sales Amount]))) as WeekSalesAMount,

Thanks,

6 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Do you have a GROUP clause in your load statement? GROUP would be required because of the sum() function. I've seen this "no error message" failure when I've forgotten the GROUP.

-Rob

Not applicable
Author

Yes, I do have a group clause in the statement.

Anonymous
Not applicable
Author

There are two typical reasons for the reload collapse without error message:

1. GROUP BY is missing or it doesn't include all fields that should be there. In this case the reload collapses at this point in the script - easy to see in the log file.

2. Script creates logical loops. In this case script runs to the end, and then collapses. Also, easy to see in the log file. Often hard to find what fields cause the loop. If I suspect this reason, I reload application in QV 7.5 which doesn't collapse but shows the loops instead by making a table or a few loosely coupled.

Not applicable
Author

hi,

this probably occurs because you might have not used the group by clause in your load statement as suggested by Rob

since sum is an aggregation function it is required to use group by clause in your load statement

thanks

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


Anthony wrote:Yes, I do have a group clause in the statement. <div></div>


Anthony, Can you post the failing load statement?

-Rob

poli
Contributor
Contributor

hello,

your aliasname is "WeekSalesAMount". Is this correct? I think it schould be "WeekSalesAmount". You wrote the "m" as a capital letter.

I had the same Problem before and for me it turned out that i wrote a letter in capitals.