Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
Not applicable

How to de-associate null cells when converting Crosstable?

Dear Experts,

Does anyone know how to de-associate null cells when converting crosstable?

Say that the Data area has some null cells in the crosstable.

When I convert this crosstable to QV, the association between the Qualifier Fields and Attribute Field always exists no matter the data field is null or what.

The result would cause that even some Select Fields have no relationship at all, they are still associated.

What I want is to eliminate these associations.

Can anyone help?

Thank you all very much in advance.

Best Regards,

Patrick

1 Reply
Not applicable

Re: How to de-associate null cells when converting Crosstable?

Hi Patrick,

I overcame this problem by performing a resident load of the resulting crosstable and applying a where clause to test that the length of the field >0.  Note that I had to specify noconcatenate on the resident load as per this forum post:

http://community.qlik.com/message/296747

Here's my code.  Hope this helps,

Rav

sourcetable:

CrossTable(Category, Data, 3)

LOAD FolderID,

     NoteID,

     NoteDate,

     MA,

     NY,

     CA,

     IL,

FROM

test_crosstable.txt

(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);

cross_no_null:

noconcatenate LOAD FolderID,

     NoteID,

     NoteDate,

     State,

     Data

resident sourcetable

WHERE(len (Data)>0);

drop table sourcetable;

Community Browser