Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
QS_
Contributor III
Contributor III

Resident Load where the sum is zero

I'm trying to do a resident load to a new table data for those days where the cost (i.e. sum of all rows of the day) is zero. 

I tried doing this with the script below.

Table2:
Load *
Resident Table1 where Len(cost)=0;
 
However, Table2 contains rows with zero cost on non-zero total cost days. Is there a way to do conditional load where sum(cost) ordered by date is zero?
Labels (3)
1 Reply
ajaykakkar93
Specialist III
Specialist III

Hi,

I have some solutions some basic checks & questions

  1. Do you have data for the day in the raw data file or table?
  2. If you do have the data is it coming in Number or String format?
  3. If it is in a number format please convert the field to number by using Num(num#(FIELD)) as FIELD_NAME
  4. this could fix your issue, make sure you first get rid of the where condition & check you data in qlik also
  5. simple steps to understand the COST field is in string or number 
    1. load the data without where
    2. create a table in qlik frontend
    3. add the field COST as Dimension
    4. If the data is on the left, it is in a string; if on the right, it is a number.
    5. If the field is a string, use num(Num#(trim(FieldName))) to convert it to a number in the same dimension. This will help you determine if it is working.
    6. When applying the same backend, this will work. However, if the issue still persists, I suggest that you please share a sample file. This will provide more clarity.

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting