Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create flag on summed up field

I have created fields to Flag whether or not there is an Error in a particular field, with 1's and 0's.  What I would like to be able to do, is create a Flag that says which fields have errors in them, that will then update as I filter on Policy's.  Here is an example of what my dataset looks like;

 

PolicyField AField BField C
1010
2000
3000
4110
501

0

I would like to be able to create a Flag so I could have a list box that would show;

Fields with Errors

Field A

Field B

Then if I select policy 1, it would function appropriately to only show Field B.

My final dataset will have 2m+ Policies and 100+ Fields, so I'm looking for a good way of doing this.  The fields I'm comparing may build over time as well, so any way to automate it would be best, though I would take any solution at this point.

Thanks,

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe something like

CROSS:

CROSSTABLE (FieldName, Flag)

LOAD *

FROM YourTableSource;

RESULT:

LOAD Policy, FieldName

RESIDENT CROSS

WHERE Flag = 1;

DROP TABLE CROSS;

The Crosstable Load

View solution in original post

3 Replies
swuehl
MVP
MVP

Maybe something like

CROSS:

CROSSTABLE (FieldName, Flag)

LOAD *

FROM YourTableSource;

RESULT:

LOAD Policy, FieldName

RESIDENT CROSS

WHERE Flag = 1;

DROP TABLE CROSS;

The Crosstable Load

effinty2112
Master
Master

Hi Joe,

               You can make a crosstable like this:

CrossData:

CrossTable(Field, Flag) LOAD * Resident Data; //Where is the dataset you mention

If you add listboxes for Policy, Field and Flag then selecting 1 in Flag will show the policies and the fields where errors reside according to your flags.

cheers

Andrew

Not applicable
Author

Thank you both!  This worked perfectly!  Was struggling with this all day.