Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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_michaelid
Honored Contributor II

Counted variable in load script to a table

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

1 Reply
jason_michaelid
Honored Contributor II

Counted variable in load script to a table

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

Community Browser