Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counted variable in load script to a table

I have one big excel file that contains all of my data. How can I count all the rows that contains 3 "or" value conditions targeted with 3 different columns? I have to check the table if these columns have NULL values present and print the total count of rows that fill these conditions in an object expression. I can do this by using "where" in load script but then I don't have access to the other rows that this statement filters. How can I create a loop that goes through the whole table and checks if the row meet the "or" conditions and then stores the final count to somewhere that I can use in a object expression later.

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

In your load script:

Data:

LOAD

     *,

     IF(IsNull(Field1) OR IsNull(Field2) OR IsNull(Field3),1,0)     AS     NullTest

FROM...Excel...;

Then, in any charts just use Sum(NullFlag) to count the number of rows that meet the test.

Hope this helps,

Jason

View solution in original post

1 Reply
Jason_Michaelides
Luminary Alumni
Luminary Alumni

In your load script:

Data:

LOAD

     *,

     IF(IsNull(Field1) OR IsNull(Field2) OR IsNull(Field3),1,0)     AS     NullTest

FROM...Excel...;

Then, in any charts just use Sum(NullFlag) to count the number of rows that meet the test.

Hope this helps,

Jason