Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set attribute

Hi all,

I want to use a function which treat all docnumbers as IC-Type, when a single item in a document number has the type IC.

For example I have this data:

Docnumber, Item, Type

1,1,IC

1,2,#N/A

1,3,3rd

2,1,#N/A

2,2,3rd

2,3,#N/A

Now all Items of Docnumber 1 should be treated as IC-Type, because one Item is equal to type IC.

Thanks!

KR

Joe

1 Solution

Accepted Solutions
MarcoWedel

Hi,

maybe helpful:

QlikCommunity_Thread_217194_Pic1.JPG

QlikCommunity_Thread_217194_Pic2.JPG

QlikCommunity_Thread_217194_Pic3.JPG

QlikCommunity_Thread_217194_Pic4.JPG

tabDocItems:

LOAD * INLINE [

    Docnumber, Item, Type

    1, 1, IC

    1, 2, #N/A

    1, 3, 3rd

    2, 1, #N/A

    2, 2, 3rd

    2, 3, #N/A

];

tabDocTypes:

LOAD Distinct

    Docnumber,

    Type as DocType

Resident tabDocItems;

Generic

LOAD Docnumber,

    DocType,

    'yes'

Resident tabDocTypes;

regards

Marco

View solution in original post

5 Replies
sunny_talwar

May be create a new column where you assign IC to all the repeating Docnumber

Table:

LOAD * Inline [

Docnumber, Item, Type

1,1,IC

1,2,#N/A

1,3,3rd

2,1,#N/A

2,2,3rd

2,3,#N/A

];

Left Join (Table)

LOAD Docnumber,

  'IC' as NewType

Resident Table

Where Type = 'IC';


Capture.PNG

MarcoWedel

Hi,

maybe helpful:

QlikCommunity_Thread_217194_Pic1.JPG

QlikCommunity_Thread_217194_Pic2.JPG

QlikCommunity_Thread_217194_Pic3.JPG

QlikCommunity_Thread_217194_Pic4.JPG

tabDocItems:

LOAD * INLINE [

    Docnumber, Item, Type

    1, 1, IC

    1, 2, #N/A

    1, 3, 3rd

    2, 1, #N/A

    2, 2, 3rd

    2, 3, #N/A

];

tabDocTypes:

LOAD Distinct

    Docnumber,

    Type as DocType

Resident tabDocItems;

Generic

LOAD Docnumber,

    DocType,

    'yes'

Resident tabDocTypes;

regards

Marco

Not applicable
Author

Thanks! It works now perfectly.

Not applicable
Author

Hi Sunny!

This should also work, but I took the proposal from Marco.

Thanks for your effort!

sunny_talwar

Not a problem, as long as you get what you were looking for