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

Excluding values from table

Hi all,

I have a requirement where i need to exclude the Orders from table depends on "Set" field value.

Let say Order 10,12 have more than one value with same Set value.So this time we need to exclude these orders from table.

INPUT:

OrderItemSetMaterialOrder Qty
1011-1ABC112
1021-1ABC23
1111-1XYZ23
1211-1XCV25
1221-1XCV25
1231-1XCV25
1241-1XCV25
1311-1qac85
1421-1wsd25
1511-1bnd12
10012-1dcv45
10022-2sdf52
10112-1klj54
10122-1klj25
10132-2klj23

OUTPUT LOOKS lIKE

===============

 

OrderItemSetMaterialOrder Qty
1111-1XYZ23
1311-1qac85
1421-1wsd25
1511-1bnd12
10012-1dcv45
10022-2sdf52
10132-2klj

23

Thanks in advance

5 Replies
arthur_dom
Creator III
Creator III

Hey man... I did it, please refer the attached

its_anandrjs

Hi,

I am also did it with some another way also with loading only unique records and exclude the duplicate row values

Script:-

Tab1:
LOAD * INLINE [
    Orders, Item, Set,    Material, Order Qty
    10, 1, 1-1, ABC, 112
    10, 2, 1-1, ABC, 23
    11, 1, 1-1, XYZ, 23
    12, 1, 1-1, XCV, 25
    12, 2, 1-1, XCV, 25
    12, 3, 1-1, XCV, 25
    12, 4, 1-1, XCV, 25
    13, 1, 1-1, qac, 85
    14, 2, 1-1, wsd, 25
    15, 1, 1-1, bnd, 12
    100, 1, 2-1, dcv, 45
    100, 2, 2-2, sdf, 52
    101, 1, 2-1, klj, 54
    101, 2, 2-1, klj, 25
    101, 3, 2-2, klj, 23
]
;

left Join

LOAD
Orders,Set,
Count(Orders&Set) as OrderSetCnt
Resident Tab1 Group By Orders,Set Order By Orders,Set ;

FinalTable:
NoConcatenate
LOAD * Resident Tab1 Where OrderSetCnt=1;

DROP Table Tab1;


And  result you get

Unique Orders.png


Regards

Anand

maxgro
MVP
MVP

if(count(TOTAL <Set, Order> Order)=1, sum([Order Qty]))

1.png

its_anandrjs

Another way is load table as it as and create OrderSetCnt and in the front end write the expression

=Sum({<OrderSetCnt ={1} >} [Order Qty])

Regards

Anand

Not applicable
Author

Thanks all looks all your solutions perfect.

Output looks good and values are excluding from table but I have a list box with values "A" and "B".

If we make any selections in list box ,that excluded values are displaying again in table.

But I don't want to display the excluded values from table even if we make any selection.

Any suggestions ,any other solutions will help me lot.

I want to do any changes in front end only not in script level.

Thanks